Tryout to run scripts with passed arguments with npm@2.0.0
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Gruntfile.js
LICENSE
Readme.md
gulpfile.js
package.json

Readme.md

Proof of concept to run Grunt and gulp without installing it globally

This repository is to show of the new feature of npm 2.0.0 of handling arguments via npm run.

Get it up

npm install

Use grunt

### run default task
> npm run grunt

> blog-npm-run-scripts@1.0.0 grunt /Users/stefan/Sites/blog-npm-run-scripts
> grunt

Running "asciify:banner" (asciify) task
 _______   __________    _____      ________     _______
 \      \  \______   \  /     \     \_____  \    \   _  \
 /   |   \  |     ___/ /  \ /  \     /  ____/    /  /_\  \
/    |    \ |    |    /    Y    \   /       \    \  \_/   \
\____|__  / |____|    \____|__  /   \_______ \ /\ \_____  /
        \/                    \/            \/ \/       \/


Done, without errors.

### run asciify task
> npm run grunt -- asciify

> blog-npm-run-scripts@1.0.0 grunt /Users/stefan/Sites/blog-npm-run-scripts
> grunt asciify

Running "asciify:banner" (asciify) task
 _______   __________    _____      ________     _______
 \      \  \______   \  /     \     \_____  \    \   _  \
 /   |   \  |     ___/ /  \ /  \     /  ____/    /  /_\  \
/    |    \ |    |    /    Y    \   /       \    \  \_/   \
\____|__  / |____|    \____|__  /   \_______ \ /\ \_____  /
        \/                    \/            \/ \/       \/


Done, without errors.

### run asciify in verbose mode
> npm run grunt -- asciify --verbose

> blog-npm-run-scripts@1.0.0 grunt /Users/stefan/Sites/blog-npm-run-scripts
> grunt asciify --verbose

Initializing
Command-line options: --verbose

Reading "Gruntfile.js" Gruntfile...OK

Registering Gruntfile tasks.
Initializing config...OK

Registering "grunt-asciify" local Npm module tasks.
Reading /Users/stefan/Sites/blog-npm-run-scripts/node_modules/grunt-asciify/package.json...OK
Parsing /Users/stefan/Sites/blog-npm-run-scripts/node_modules/grunt-asciify/package.json...OK
Loading "asciify.js" tasks...OK
+ asciify
Loading "Gruntfile.js" tasks...OK
+ default

Running tasks: asciify

Running "asciify" task

Running "asciify:banner" (asciify) task
Verifying property asciify.banner exists in config...OK
File: [no files]
Options: font="graffiti", log
 _______   __________    _____      ________     _______
 \      \  \______   \  /     \     \_____  \    \   _  \
 /   |   \  |     ___/ /  \ /  \     /  ____/    /  /_\  \
/    |    \ |    |    /    Y    \   /       \    \  \_/   \
\____|__  / |____|    \____|__  /   \_______ \ /\ \_____  /
        \/                    \/            \/ \/       \/


Done, without errors.

Use gulp

### run default task
> npm run gulp

> blog-npm-run-scripts@1.0.0 gulp /Users/stefan/Sites/blog-npm-run-scripts
> gulp

[00:14:07] Using gulpfile ~/Sites/blog-npm-run-scripts/gulpfile.js
[00:14:07] Starting 'default'...
-> Executing Default <-
[00:14:07] Finished 'default' after 87 μs

### run special task
> npm run gulp special

> blog-npm-run-scripts@1.0.0 gulp /Users/stefan/Sites/blog-npm-run-scripts
> gulp special

[00:15:31] Using gulpfile ~/Sites/blog-npm-run-scripts/gulpfile.js
[00:15:31] Starting 'special'...
-> Executing Special <-

No global dependency needed. :)