Skip to content

Instantly share code, notes, and snippets.

@mrnosal
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrnosal/10999199 to your computer and use it in GitHub Desktop.
Save mrnosal/10999199 to your computer and use it in GitHub Desktop.
Testcase for grunt-shell file argument expansion
#!/usr/bin/env node
var argv = require('yargs').argv
console.log(argv._)
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'
]);
};
{
"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"
}
}
@mrnosal
Copy link
Author

mrnosal commented Apr 17, 2014

$ npm install
$ grunt
on Mac: [ 'Gruntfile.js', 'argv.js' ]
on Win: [ '*.js' ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment