Skip to content

Commit

Permalink
command-line-args replaced minimist
Browse files Browse the repository at this point in the history
  • Loading branch information
sunitJindal committed Jun 12, 2017
1 parent cc457f8 commit e76e65e
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
12 changes: 9 additions & 3 deletions bin/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#!/usr/bin/env node

const argv = require('minimist')(process.argv.slice(2));
const commandLineArgs = require('command-line-args');

const optionDefinitions = [
{ name: 'flat', type: Boolean }
];

const argv = commandLineArgs(optionDefinitions);
const presentationalCreator = require('../lib/presentationalCreator');
const componentName = argv._[0];
const componentName = argv.files[0];
const flat = argv.flat;

console.dir(argv)
presentationalCreator(componentName, flat);


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"jest": "^20.0.4"
},
"dependencies": {
"minimist": "1.2.0"
"command-line-args": "4.0.6"
}
}
34 changes: 33 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ arr-flatten@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1"

array-back@^1.0.3, array-back@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b"
dependencies:
typical "^2.6.0"

array-equal@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93"
Expand Down Expand Up @@ -748,6 +754,14 @@ combined-stream@^1.0.5, combined-stream@~1.0.5:
dependencies:
delayed-stream "~1.0.0"

command-line-args@4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.6.tgz#0ff87a1dd159890dcaeb2a005abdae71e55059fc"
dependencies:
array-back "^1.0.4"
find-replace "^1.0.3"
typical "^2.6.1"

concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
Expand Down Expand Up @@ -938,6 +952,13 @@ fill-range@^2.1.0:
repeat-element "^1.1.2"
repeat-string "^1.5.2"

find-replace@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0"
dependencies:
array-back "^1.0.4"
test-value "^2.1.0"

find-up@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
Expand Down Expand Up @@ -1673,7 +1694,7 @@ minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4:
dependencies:
brace-expansion "^1.1.7"

minimist@^1.1.1, minimist@1.2.0:
minimist@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"

Expand Down Expand Up @@ -2189,6 +2210,13 @@ test-exclude@^4.1.1:
read-pkg-up "^1.0.1"
require-main-filename "^1.0.1"

test-value@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291"
dependencies:
array-back "^1.0.3"
typical "^2.6.0"

throat@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6"
Expand Down Expand Up @@ -2231,6 +2259,10 @@ type-check@~0.3.2:
dependencies:
prelude-ls "~1.1.2"

typical@^2.6.0, typical@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d"

uglify-js@^2.6:
version "2.8.27"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.27.tgz#47787f912b0f242e5b984343be8e35e95f694c9c"
Expand Down

0 comments on commit e76e65e

Please sign in to comment.