Tag: angularjs gulp

Gulp.js无法编译angular.js项目由于过多的js错误?

我正尝试从Grunt转移到Gulp。 这个项目在Grunt下运行良好,所以我一定在Gulp做错了。 除脚本外,其他任务都可以工作。 现在我已经厌倦了添加和注释部分。 我不断收到有关意外令牌的错误。 使用mg-min: stream.js:94 throw er; // Unhandled stream error in pipe. ^ Error: Line 2: Unexpected token : at throwError (/Users/stevelombardi/Documents/dsg/node_modules/gulp-ngmin/node_modules/ngmin/node_modules/esprima/esprima.js:1156:21) 用ng-min注释掉并使用uglify(默认): Error caught from uglify: Unexpected token: punc (:) in /Users/stevelombardi/Documents/dsg/dist/scripts/main.min.js. Returning unminifed code [gulp] gulp-notify: [Gulp notification] Scripts task complete [gulp] Finished 'scripts' after 2.97 s 我很难过 这是任务: // […]