Gathering detailed insights and metrics for rev-del
Gathering detailed insights and metrics for rev-del
Gathering detailed insights and metrics for rev-del
Gathering detailed insights and metrics for rev-del
:haircut: Delete old fingerprinted files Delete old fingerprinted files
npm install rev-del
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
35 Stars
41 Commits
16 Forks
3 Watchers
1 Branches
8 Contributors
Updated on Jun 14, 2021
Latest Version
2.0.0
Package Id
rev-del@2.0.0
Unpacked Size
10.39 kB
Size
3.50 kB
File Count
7
NPM Version
6.4.1
Node Version
10.13.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Delete old, unused fingerprinted files from a revision manifest generated by a module such as gulp-rev.
$ npm install --save-dev rev-del
1revDel({
2 oldManifest: 'rev-manifest.json',
3 newManifest: { /* a manifest */ },
4 suppress: true,
5 deleteMapExtensions: false
6}, function (err, filesDeleted) {
7 // ...
8});
The manifests can be either objects or paths to files. oldManifest
defaults
to "rev-manifest.json" (which is the default output for gulp-rev), and
newManifest has no default; it's assumed that you've got it in memory, so it's
more efficient to pass it in as an object.
suppress
, when set to false, will throw an error when rev-manifest.json
doesn't exist. You don't normally want to change: usually, the first time you
run your revisioning script, the manifest doesn't exist yet.
deleteMapExtensions
, when set to true, will try and find any ".map" files generated by gulp-sourcemaps belonging to changed files in oldManifest
and delete those too.
rev-del works great with Gulp and gulp-rev. You need to specify either dest
in the options, or base
in the manifest options—unless you're writing
everything to the root directory.
1var gulp = require('gulp'); 2var rev = require('gulp-rev'); 3var revDel = require('rev-del'); 4 5gulp.task('default', function () { 6 return gulp.src('src/*.css') 7 .pipe(rev()) 8 .pipe(gulp.dest('dist')) 9 .pipe(rev.manifest()) 10 .pipe(revDel({ dest: 'dist' })) // <-- 11 .pipe(gulp.dest('dist')); 12});
You can pass it the name of the old manifest if you're not using the default:
1var gulp = require('gulp'); 2var rev = require('gulp-rev'); 3var revDel = require('rev-del'); 4 5gulp.task('default', function () { 6 return gulp.src('src/*.css') 7 .pipe(rev()) 8 .pipe(gulp.dest('dist')) 9 .pipe(rev.manifest('my-manifest.json')) 10 .pipe(revDel('some-other-manifest.json')) // <-- 11 .pipe(gulp.dest('dist')); 12});
Call it before you call gulp.dest
.
Note that you only need to change the name of manifest if it is different to
the path given to rev.manifest()
: if you just change the name of the
manifest, rev-del will handle it fine:
1// This works 2var gulp = require('gulp'); 3var rev = require('gulp-rev'); 4var revDel = require('rev-del'); 5 6gulp.task('default', function () { 7 return gulp.src('src/*.css') 8 .pipe(rev()) 9 .pipe(gulp.dest('dist')) 10 .pipe(rev.manifest('my-manifest.json')) 11 .pipe(revDel({ dest: 'dist' })) // <-- 12 .pipe(gulp.dest('dist')); 13});
You can also specify the base
as one of the options. Again, you don't need to
do this if you've given it to rev.manifest()
!
You can also add force: true
as an option. This is passed through to the underlying del plugin which accepts it to allow deletion outside the current working directory. This comes in handy when you get a gulp error like 'Cannot delete files/folders outside the current working directory. Can be overriden with the force
option.'
Released under the MIT license.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 8/14 approved changesets -- score normalized to 5
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More