File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -85,19 +85,19 @@ Function that determines whether the source file is different from the destinati
8585
8686Named imports:
8787
88- - ` compareLastModifiedTime `
89- - ` compareContents `
88+ - ` compareLastModifiedTime ` - Compare modification times (default)
89+ - ` compareContents ` - Compare file contents (only useful for files that are copied without transformation)
9090
9191###### Example
9292
9393``` js
9494import {compareContents } from ' gulp-changed' ;
9595
96- export const jade = () => (
97- gulp . src ( ' src/**/*.jade ' )
98- . pipe ( changed ( ' app ' , {hasChanged : compareContents}) )
99- .pipe (jade ( ))
100- .pipe (gulp .dest (' app ' ))
96+ // compareContents only works when files are copied without transformation
97+ export const images = () => (
98+ gulp . src ( ' src/images/**/* ' )
99+ .pipe (changed ( ' dist/images ' , {hasChanged : compareContents} ))
100+ .pipe (gulp .dest (' dist/images ' ))
101101);
102102```
103103
You can’t perform that action at this time.
0 commit comments