node.js - npm run gulp with parameters -


i've started learning gulp , i'm dealing small issue.
have following file:

//test gulp file  var gulp = require("gulp"),      uglify = require("gulp-uglify");   //scripts task  //uglifies  gulp.task("scripts", function(){      console.log("run scripts");      gulp.src("public/src/js/home/app.js")         .pipe(uglify())         .pipe(gulp.dest("public/src/js/home/bundle"));  //use *.js uglify  });   gulp.task("default", []);  

when trying execute file using:

npm run gulp scripts  

it not execute assigned task.
however, when add parameters of default:

gulp.task("default", ["scripts"]);  

it work when run

npm run gulp   

i installed gulp locally in project folder.
reason why passing "scripts" parameter doesn't work?

only npm >= 2 pass arguments scripts, it's part of new features can see in "why 2.0.0?" part here


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -