我希望我的gulpfile.js比较我的角色级联文件在ng-annotate运行之前和之后的内容,以便我可以查看它所做的注入。我无法完全理解语法。我不断收到不同版本的错误说,吞咽不能统计我的文件。gulp和gulp-diff的问题
我卡在下面的代码。我很乐意一次完成,但是没有成功。
gulp.task('scripts', function() {
gulp.src(['public/app/**/*.js'])
.pipe(concat('main-noanotate.js'))
.pipe(rename({suffix: '.noannotate.js'}))
.pipe(gulp.dest('public/dist'));
return gulp.src(['public/app/**/*.js'])
.pipe(concat('main.js'))
.pipe(ngAnnotate())
.pipe(diff('main.noannotate.js'))
.pipe(diff.reporter({ fail: true }))
.pipe(gulp.dest('public/dist'))
});
我还在为此而苦苦挣扎。我得到了一些工作(发布了博客文章),但它仍然是不正确的。我无法在正常的完整吞咽默认处理中运行我的脚本任务。 http://peterkellner.net/2014/11/14/angular-ngannotate-better-way/ – 2014-11-15 01:20:20