Я использую веб-приложение Yo Generator в качестве основы для сборки что-то с PUG. Однако это все еще отсылка к Бауэру. Поэтому я переключаю все необходимые пакеты JS на npm. Но эта задача gulp игнорирует все библиотеки в node_modules.
gulp.task('html', ['views', 'styles', 'scripts'], () => {
return gulp.src([
'tmp/**/*.html',
'app/**/*.html',
'!app/layouts/**/*'
])
.pipe($.useref({searchPath: [paths.tmp, paths.src, '.']}))
.pipe($.if(/\.js$/, $.uglify({ compress: {drop_console: true} })))
.pipe($.if(/\.css$/, $.cssnano({ safe: true, autoprefixer: true })))
.pipe($.if(/\.html$/, $.htmlmin({
collapseWhitespace: true,
minifyCSS: true,
minifyJS: {compress: {drop_console: true}},
processConditionalComments: true,
removeComments: true,
removeEmptyAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
})))
.pipe(gulp.dest('dist'));
});
есть ли способ сообщить gulp-useref объединить js lib из этого пути /node_modules/