调试 gulp 匹配文件的目录
const gulp = require('gulp');
const gutil = require('gulp-util');
const gulpIgnore = require('gulp-ignore');
const vinylPaths = require('vinyl-paths');
const libAssetsSrc = [
'src/lib/?*/**/*',
'!src/lib/?*/**/*.js',
'!src/lib/?*/**/*.css',
'!src/lib/?*/**/*.less',
'!src/lib/?*/**/*.map',
'src/lib/lib-min-*.js',
'src/lib/lib-min-*.js.map',
'src/lib/lib-min-*.css',
'src/lib/lib-min-*.css.map'
];
gulp.task("testPath", function () {
gulp.src(libAssetsSrc)
.pipe(gulpIgnore.exclude({isDirectory: true}))
.pipe(vinylPaths(paths => {
gutil.log('Paths:', paths);
return Promise.resolve();
}))
.pipe(gulpIgnore.exclude(true));
});