Gathering detailed insights and metrics for gulp-changed
Gathering detailed insights and metrics for gulp-changed
Gathering detailed insights and metrics for gulp-changed
Gathering detailed insights and metrics for gulp-changed
npm install gulp-changed
46.7
Supply Chain
95.1
Quality
72.2
Maintenance
100
Vulnerability
99.6
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
742 Stars
88 Commits
44 Forks
16 Watching
1 Branches
22 Contributors
Updated on 11 Oct 2024
Minified
Minified + Gzipped
JavaScript (99.96%)
CoffeeScript (0.04%)
Cumulative downloads
Total Downloads
Last day
-10.3%
8,432
Compared to previous day
Last week
-9.8%
47,935
Compared to previous week
Last month
16.7%
203,895
Compared to previous month
Last year
-16.8%
2,164,594
Compared to previous year
3
1
Only pass through changed files
No more wasting precious time on processing unchanged files.
By default it's only able to detect whether files in the stream changed. If you require something more advanced like knowing if imports/dependencies changed, create a custom comparator, or use another plugin.
1npm install --save-dev gulp-changed
1import gulp from 'gulp'; 2import changed from 'gulp-changed'; 3import ngAnnotate from 'gulp-ng-annotate'; // Just as an example 4 5const SOURCE = 'src/*.js'; 6const DESTINATION = 'dist'; 7 8exports.default = () => ( 9 gulp.src(SOURCE) 10 .pipe(changed(DESTINATION)) 11 // `ngAnnotate` will only get the files that 12 // changed since the last time it was run 13 .pipe(ngAnnotate()) 14 .pipe(gulp.dest(DESTINATION)) 15);
Type: string | Function
Destination directory. Same as you put into gulp.dest()
.
This is needed to be able to compare the current files with the destination files.
Can also be a function returning a destination directory path.
Type: object
Type: string
Default: process.cwd()
Working directory the folder is relative to.
Type: string
Extension of the destination files.
Useful if it differs from the original, like in the example below:
1export const jade = () => ( 2 gulp.src('src/**/*.jade') 3 .pipe(changed('app', {extension: '.html'})) 4 .pipe(jade()) 5 .pipe(gulp.dest('app')) 6);
Type: Function
Default: compareLastModifiedTime
Function that determines whether the source file is different from the destination file.
Named imports:
compareLastModifiedTime
compareContents
1import {compareContents} from 'gulp-changed'; 2 3export const jade = () => ( 4 gulp.src('src/**/*.jade') 5 .pipe(changed('app', {hasChanged: compareContents})) 6 .pipe(jade()) 7 .pipe(gulp.dest('app')) 8);
You can also specify a custom comparator function, which will receive the following arguments:
sourceFile
(Vinyl file object)destinationPath
(string) - The destination for sourceFile
as an absolute pathThe function is expected to return sourceFile | Promise<sourceFile>
if it passes some comparison or undefined | Promise<undefined>
. Examples.
Type: Function
Function to transform the path to the destination file. Should return the absolute path to the (renamed) destination file.
Useful if you rename your file later on, like in the below example:
1export const marked = () => ( 2 gulp.src('src/content/about.md') 3 .pipe(changed('dist', { 4 transformPath: newPath => path.join(path.dirname(newPath), path.basename(newPath, '.md'), 'index.html') 5 })) 6 .pipe(marked()) 7 .pipe(rename(newPath => path.join(path.dirname(newPath), path.basename(newPath, '.md'), 'index.html'))) 8 .pipe(gulp.dest('dist')) 9);
If you're looking to process source files in-place without any build output (formatting, linting, etc), have a look at gulp-changed-in-place.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 7/30 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy 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 2024-11-18
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@types/gulp-changed
TypeScript definitions for gulp-changed
gulp-changed-in-place
Only pass through changed files
gulp-less-changed
Only pass .less files through the gulp stream if they or their dependencies have changed
@ryancavanaugh/gulp-changed
Type definitions for gulp-changed from https://www.github.com/DefinitelyTyped/DefinitelyTyped