forked from yeoman/generator-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d194a30
commit fd76965
Showing
5 changed files
with
23 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
#! /usr/bin/env node | ||
|
||
#!/usr/bin/env node | ||
'use strict'; | ||
|
||
var meow = require('meow'); | ||
var <%= safeSlugname %> = require('./lib/<%= slugname %>'); | ||
|
||
var userArgs = process.argv; | ||
var searchParam = userArgs[2]; | ||
|
||
if (userArgs.indexOf('-h') !== -1 || userArgs.indexOf('--help') !== -1 || searchParam === undefined) { | ||
return console.log('cli help'); | ||
} | ||
var cli = meow({ | ||
help: [ | ||
'Usage', | ||
' <%= slugname %> <input>', | ||
'', | ||
'Example', | ||
' <%= slugname %> Unicorn' | ||
].join('\n') | ||
}); | ||
|
||
if (userArgs.indexOf('-v') !== -1 || userArgs.indexOf('--version') !== -1) { | ||
return console.log(require('./package').version); | ||
} | ||
<%= safeSlugname %>(cli.input[0]); |
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
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
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
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