-
Notifications
You must be signed in to change notification settings - Fork 2
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
tunnckoCore
committed
Mar 2, 2015
1 parent
7071304
commit c8ef22d
Showing
2 changed files
with
46 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env node | ||
/** | ||
* current-week-number <https://github.com/datetime/current-week-number> | ||
* | ||
* Copyright (c) 2014-2015 Charlike Mike Reagent, contributors. | ||
* Released under the MIT license. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
var pkg = require('./package.json'); | ||
var currentWeekNumber = require('./'); | ||
var argv = process.argv.slice(2); | ||
|
||
function help() { | ||
console.log([ | ||
'', | ||
' ' + pkg.description, | ||
'', | ||
' Example', | ||
' $ current-week-number September 15, 2126', | ||
' 37', | ||
' $ current-week-number August 07, 2016', | ||
' 32', | ||
' $ current-week-number 02/17/2012', | ||
' 7', | ||
' $ current-week-number', | ||
' 10' | ||
].join('\n')); | ||
} | ||
|
||
if (argv.indexOf('--help') !== -1) { | ||
return help(); | ||
} | ||
|
||
if (argv.indexOf('--version') !== -1) { | ||
console.log(pkg.version); | ||
return; | ||
} | ||
|
||
console.log(currentWeekNumber(argv.join(''))); |
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
"test-travis": "istanbul cover _mocha --report lcovonly" | ||
}, | ||
"author": { | ||
"name": "Charlike Make Reagent", | ||
"name": "Charlike Mike Reagent", | ||
"email": "[email protected]", | ||
"url": "https://github.com/tunnckoCore" | ||
}, | ||
|
@@ -46,11 +46,12 @@ | |
"type": "MIT", | ||
"url": "https://github.com/datetime/current-week-number/blob/master/license.md" | ||
}, | ||
"dependencies": { | ||
"meow": "~3.0.0" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"istanbul-harmony": "~0.3.1", | ||
"mocha": "~2.1.0" | ||
}, | ||
"bin": { | ||
"current-week-number": "cli.js" | ||
} | ||
} |