sindresorhus / gulp-changed

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

SRC Variable - Array Capabilities #61

Open SomethingNew71 opened 7 years ago

SomethingNew71 commented 7 years ago

Hey it would be wonderful if the SRC variable could accept an array of strings that then could be compared in the destination.

Example

'use strict';

const changed = require('gulp-changed');
const eslint = require('gulp-eslint');
const gulp = require('gulp');
const path = require('path');
const rootDir = path.join(__dirname, '..');

const changedOptions = {
  cwd: rootDir
};

gulp.task('lint:js', () => {
  const files = [
    'src/resources/base/**/*.js',
    'src/resources/components/**/*.js',
    'src/resources/data/**/*.js',
    'src/resources/layouts/**/*.js',
    'src/resources/pages/**/*.js',
    'src/resources/patterns/**/*.js',
    'src/resources/xml/**/*.js',
    'gulp-tasks/**/*.js'
  ];
  return gulp.src(files)
    .pipe(changed('build/resources/', changedOptions))
    .pipe(eslint())
    .pipe(eslint.format());
});