Last active
August 29, 2015 13:59
-
-
Save mrnosal/10999199 to your computer and use it in GitHub Desktop.
Testcase for grunt-shell file argument expansion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var argv = require('yargs').argv | |
console.log(argv._) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (grunt) { | |
// load all grunt tasks | |
grunt.initConfig({ | |
shell: { | |
Argv: { | |
options: { | |
stdout: true, | |
failOnError: true | |
}, | |
command: 'node argv.js *.js' | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-shell'); | |
grunt.registerTask('default', [ | |
'shell:Argv' | |
]); | |
}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "argv_testing", | |
"version": "0.1.0", | |
"description": "Simple testcase for file argument expansion with grunt-shell and yargs", | |
"repository": ".", | |
"author": "Mike Nosal", | |
"readme": "", | |
"devDependencies": { | |
"grunt": "~0.4.4", | |
"grunt-shell": "~0.6.4", | |
"yargs": "~1.2.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ npm install
$ grunt
on Mac: [ 'Gruntfile.js', 'argv.js' ]
on Win: [ '*.js' ]