Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Last active October 27, 2018 15:26
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 Shelob9/72dcd52fc2d52c7364d96b962e20ab9b to your computer and use it in GitHub Desktop.
Save Shelob9/72dcd52fc2d52c7364d96b962e20ab9b to your computer and use it in GitHub Desktop.
npx https://gist.github.com/zkat/4bc19503fe9e9309e2bfaa2c58074d32
#!/usr/bin/env node
console.log('yay gist')
#!/usr/bin/env node
console.log('I am the Batman.')
npx ~/npx-is-cool
npm init # add package.json
npm install commander --save
#!/usr/bin/env node
const program = require('commander');
program
.version('0.1.0')
.option('-h, --hi-roy', 'Add bbq sauce')
.parse(process.argv);
if (program.hiRoy){
console.log( 'Hi Roy');
}
#!/usr/bin/env node
const program = require('commander');
program
.version('0.1.0')
.option('-h, --hi-roy', 'Add bbq sauce')
.option('-wpti, --wp-tests-i [directory]', 'Copy WordPress Test suite to [directory]', './')
.parse(process.argv);
if (program.hiRoy){
console.log( 'Hi Roy');
}
if (program.wpTestsI){
console.log( program.wpTestsI );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment