Closed igrek8 closed 8 years ago
.pipe($.useref.restore()) raises error and undefined
.pipe($.useref.restore())
Generated through yo generator for angular.
gulp.task('client:build', ['html', 'styles'], function () { var jsFilter = $.filter('**/*.js', { restore: true }); var cssFilter = $.filter('**/*.css', { restore: true }); $.util.log(typeof($.useref.restore) === 'function'); return gulp.src(paths.views.main) .pipe($.useref.assets({searchPath: [yeoman.app, '.tmp']})) .pipe(jsFilter) .pipe($.ngAnnotate()) .pipe($.uglify()) .pipe(jsFilter.restore()) .pipe(cssFilter) .pipe($.minifyCss({cache: true})) .pipe(cssFilter.restore()) .pipe($.rev()) .pipe($.useref.restore()) .pipe($.revReplace()) .pipe($.useref()) .pipe(gulp.dest(yeoman.dist)); });
What am I doing wrong?
Solved
var assets = $.useref.assets({searchPath: [yeoman.app, '.tmp']});
.pipe(assets) .. .pipe(assets.restore())
.pipe(assets)
.pipe(assets.restore())
.pipe($.useref.restore())
raises error and undefinedGenerated through yo generator for angular.
What am I doing wrong?