A
A
Anton89892016-08-12 10:44:14
gulp.js
Anton8989, 2016-08-12 10:44:14

Why is gulp-uglifyjs not working?

I want to combine the included js libraries into one file, and my scripts into another (scripts.min.js) and minify it. Neither one nor the other is executed, regardless of the configured task (?). What am I doing wrong?
gulp.task('scripts',function(){
return gulp.src(['app/libs/jquery/dist/jquery.min.js',
'app/libs/magnific-popup/dist/jquery.magnific-popup .min.js'])
.pipe(concat('libs.min.js')) //collect into a single file
.pipe(uglify()) //compress the js file
.pipe(gulp.dest('app /js'));
});
gives the following
C:\myproject>gulp scripts
(node:2768) fs: re-evaluating native module sources is not supported. If you are
using the graceful-fs module, please update it to a more recent version.
module.js:442
throw err;
^
Error: Cannot find module 'gulp=concat'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js: 468:17)
at require (internal/module.js:20:19)
at Object. (C:\myproject\gulpfile.js:4:14)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load ( module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
C:\myproject>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question