sindresorhus / gulp-changed

Only pass through changed files
MIT License
742 stars 44 forks source link

Typo in readme API hasChanged after update to 5.0.0 #90

Closed alkorlos closed 11 months ago

alkorlos commented 11 months ago

Now in readme.md

hasChanged
Example
export const jade = () => (
  gulp.src('src/**/*.jade')
      .pipe(changed('app', {hasChanged: changed.compareContents}))
      .pipe(jade())
      .pipe(gulp.dest('app'))
);

In v5.0.0 have change:

The built-in comparators are now exposed as named imports instead of properties of gulpChanged

The example needs to be corrected to

import { compareContents } from 'gulp-changed';

export const jade = () => (
    gulp.src('src/**/*.jade')
        .pipe(changed('app', {hasChanged: compareContents}))
        .pipe(jade())
        .pipe(gulp.dest('app'))
);