node.js - Main Bower files -


in angularjs app, try concat bower file because have many lib. make task concat file, here code

var filter = require('gulp-filter'); var mainbowerfiles = require('gulp-main-bower-files'); var dest = 'dist/scripts';  gulp.task('main-bower-files', function() { return gulp.src('./bower.json') .pipe(mainbowerfiles([[filter, ]options][, callback]))     .pipe(gulp.dest('dist/scripts')); }); 

after call task in nodejs cmd, error in chrome console

.pipe(mainbowerfiles([[filter, ]options][, callback])) 

this error in node cmd

    .pipe(mainbowerfiles([[filter, ]options][, callback]))                                 ^^^^^^^  syntaxerror: unexpected identifier @ exports.runinthiscontext (vm.js:53:16) @ module._compile (module.js:373:25) @ object.module._extensions..js (module.js:416:10) @ module.load (module.js:343:32) @ function.module._load (module.js:300:12) @ module.require (module.js:353:17) @ require (internal/module.js:12:17) @ liftoff.handlearguments       (c:\users\aaa\appdata\roaming\npm\node_modules\gulp\bin\gulp.js:116:3) @ liftoff.<anonymous> (c:\users\aaa\appdata\roaming\npm\node_modules\gulp\node_modules\liftoff\index.js:198:16) @ module.exports (c:\users\aaa\appdata\roaming\npm\node_modules\gulp\node_modules\liftoff\node_modules\flagged-respawn\index.js:17:3) 

if know solution??? thnx

i fix library, called bower-files.

var lib    = require('bower-files')(); gulp.task('bower_js', function () { gulp.src(jsbowerfile) .pipe(concat('bower_js.js')) .pipe(gulp.dest('dist/scripts')) .pipe(ngmin()) .pipe(uglify({mangle: false})) .pipe(gulp.dest('dist/scripts')); }); 

Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -