Skip to content

Commit

Permalink
Add cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoshiaki Kawazu committed Feb 27, 2017
1 parent dddc764 commit 1ad92eb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
12 changes: 12 additions & 0 deletions bin/unbreaker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env node
/*eslint no-console: 0*/

if(process.argv.length <= 2) {
console.log("Usage: unbreaker str [str...]");
process.exit(1);
}

var unbreaker = require('../lib/unbreaker');
process.argv.slice(2).forEach(function(s){
console.log(unbreaker(s));
});
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "git+ssh://git@github.com/kawaz/unbreaker.git"
},
"version": "1.0.4",
"version": "1.0.5",
"author": "Yoshiaki Kawazu <kawazzz@gmail.com> (https://twitter.com/kawaz)",
"homepage": "https://github.com/kawaz/unbreaker",
"license": "MIT",
Expand All @@ -23,6 +23,9 @@
"files": [
"lib"
],
"bin": {
"unbreaker": "unbreaker.js"
},
"main": "lib/unbreaker.js",
"scripts": {
"build": "NODE_ENV=production babel src --out-dir lib --source-maps",
Expand Down

0 comments on commit 1ad92eb

Please sign in to comment.