├── .editorconfig ├── .gitignore ├── CONTRIBUTING.md ├── README.md ├── commands └── create.js ├── helpers ├── clean.js ├── clone.js ├── createTmp.js ├── parseInfo.js ├── processTemplates.js └── promisefyStream.js ├── index.js ├── package-lock.json └── package.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | 3 | node_modules 4 | npm-debug.log 5 | 6 | .DS_Store 7 | .AppleDouble 8 | .LSOverride 9 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | 1. Fork it! 4 | 2. Create your feature branch: `git checkout -b my-new-feature` 5 | 3. Commit your changes: `git commit -m 'Add some feature'` 6 | 4. Push to the branch: `git push origin my-new-feature` 7 | 8 | **After your pull request is merged**, you can safely delete your branch. 9 | 10 | ### [<-- Back](https://github.com/lyef/lyef-react-cli/) 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Lyef React Cli [![NPM version](https://badge-me.herokuapp.com/api/npm/lyef-react-cli.png)](http://badges.enytc.com/for/npm/lyef-react-cli) 2 | 3 | > A terminal CLI to create isolated and decoupled react componentes with es6. To understand more about the structure and philosophy, please take a look to the [generated structure here](https://github.com/lyef/lyef-react-component/). 4 | 5 | ## Getting Started 6 | 7 | Install `lyef-react-cli` globally: 8 | 9 | ```bash 10 | $ npm install -g lyef-react-cli 11 | ``` 12 | 13 | ### Usage 14 | 15 | Run the create command: 16 | 17 | ```bash 18 | 19 | # passing the attributes directly 20 | $ lyef-react create my-component-name authorname "Some description about it" 0.0.1 21 | 22 | # passing just the name 23 | $ lyef-react create my-component-name 24 | ``` 25 | 26 | ## Contributing 27 | 28 | See the [CONTRIBUTING Guidelines](https://github.com/lyef/lyef-react-cli/blob/master/CONTRIBUTING.md) 29 | 30 | ## Support 31 | If you have any problem or suggestion please open an issue [here](https://github.com/lyef/lyef-react-cli/issues). 32 | 33 | ## License 34 | 35 | [MIT License](https://github.com/lyef/lyef-react-cli/blob/master/LICENSE.md) @ [lyef](https://lyef.github.io) 36 | -------------------------------------------------------------------------------- /commands/create.js: -------------------------------------------------------------------------------- 1 | const clone = require('../helpers/clone'); 2 | const clean = require('../helpers/clean'); 3 | const parseInfo = require('../helpers/parseInfo'); 4 | const createTmp = require('../helpers/createTmp'); 5 | const processTemplates = require('../helpers/processTemplates'); 6 | 7 | module.exports = create; 8 | 9 | function create (name = 'my-component', author = 'my-name', description = 'My description.', version = '0.0.1') { 10 | const info = parseInfo(name, author, description, version); 11 | clone(name) 12 | .then(() => createTmp(name)) 13 | .then(() => processTemplates(info)) 14 | .then(() => clean(name)); 15 | } 16 | -------------------------------------------------------------------------------- /helpers/clean.js: -------------------------------------------------------------------------------- 1 | const spawn = require('child_process').spawn; 2 | const ora = require('ora'); 3 | const promisefyStream = require('./promisefyStream'); 4 | 5 | module.exports = clean; 6 | 7 | function clean (name) { 8 | const folders = [ 9 | `${process.cwd()}/.tmp`, 10 | `${process.cwd()}/${name}/.git` 11 | ]; 12 | const stream = spawn('rm', ['-vr', ...folders]).stdout; 13 | 14 | const spinner = ora('Removing unecessary folders').start(); 15 | 16 | return promisefyStream(stream) 17 | .then(spinner.succeed.bind(spinner)) 18 | .catch(spinner.fail.bind(spinner)); 19 | } 20 | -------------------------------------------------------------------------------- /helpers/clone.js: -------------------------------------------------------------------------------- 1 | const spawn = require('child_process').spawn; 2 | const ora = require('ora'); 3 | const promisefyStream = require('./promisefyStream'); 4 | 5 | module.exports = clone; 6 | 7 | function clone (name) { 8 | const stream = spawn('git', ['clone', 'https://github.com/lyef/lyef-react-template', `${process.cwd()}/${name}`]).stdout; 9 | 10 | const spinner = ora('Cloning template from github').start(); 11 | 12 | return promisefyStream(stream) 13 | .then(spinner.succeed.bind(spinner)) 14 | .catch(spinner.fail.bind(spinner)); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /helpers/createTmp.js: -------------------------------------------------------------------------------- 1 | const spawn = require('child_process').spawn; 2 | const ora = require('ora'); 3 | const promisefyStream = require('./promisefyStream'); 4 | 5 | module.exports = createTmp; 6 | 7 | function createTmp (name) { 8 | const stream = spawn('cp', ['-r', `${process.cwd()}/${name}`, `${process.cwd()}/.tmp`]).stdout; 9 | 10 | const spinner = ora('Creating .tmp').start(); 11 | 12 | return promisefyStream(stream) 13 | .then(spinner.succeed.bind(spinner)) 14 | .catch(spinner.fail.bind(spinner)); 15 | } 16 | -------------------------------------------------------------------------------- /helpers/parseInfo.js: -------------------------------------------------------------------------------- 1 | const camelCase = require('lodash.camelcase'); 2 | const kebabCase = require('lodash.kebabcase'); 3 | const humanize = require('humanize-component'); 4 | 5 | module.exports = parseInfo; 6 | 7 | function parseInfo (name, author, description, version) { 8 | return { 9 | name, 10 | appNameHumanized: humanize(name), 11 | authorName: author, 12 | appName: kebabCase(name), 13 | appNameCamel: camelCase(name), 14 | appVersion: version, 15 | appDescription: description 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /helpers/processTemplates.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const gs = require('glob-stream'); 3 | const _template = require('lodash.template'); 4 | const reduce = require('through2-reduce'); 5 | const map = require('through2-map'); 6 | const ora = require('ora'); 7 | const promisefyStream = require('./promisefyStream'); 8 | 9 | module.exports = processTemplates; 10 | 11 | function createTemplateStream (path, info) { 12 | return fs.createReadStream(path) 13 | .pipe(reduce((file, chunk) => file + template(chunk, info), '')) 14 | .pipe(fs.createWriteStream(path.replace('.tmp/', `${info.name}/`))); 15 | } 16 | 17 | function template (buffer, data) { 18 | return _template(buffer.toString())(data); 19 | } 20 | 21 | function processTemplates (info) { 22 | const stream = gs.create(['.tmp/**/*.*', '!.tmp/.git/**/*']) 23 | .pipe(map({objectMode: true}, chunk => createTemplateStream(chunk.path, info))); 24 | 25 | const spinner = ora('Processing templates').start(); 26 | 27 | return promisefyStream(stream) 28 | .then(spinner.succeed.bind(spinner)) 29 | .catch(spinner.fail.bind(spinner)); 30 | }; 31 | -------------------------------------------------------------------------------- /helpers/promisefyStream.js: -------------------------------------------------------------------------------- 1 | module.exports = promisefyStream; 2 | 3 | function promisefyStream (stream) { 4 | return new Promise((resolve, reject) => { 5 | stream.on('finish', resolve); 6 | stream.on('error', reject); 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node --harmony 2 | 3 | const program = require('commander'); 4 | 5 | const create = require('./commands/create'); 6 | 7 | program.version('1.0.1'); 8 | 9 | program 10 | .command('create [author] [description] [version]') 11 | .description('\nCreates a new structure for your awesome newborn independent component') 12 | .action(create); 13 | 14 | program.on('--help', function(){ 15 | console.log(' Examples:'); 16 | console.log(''); 17 | console.log(' $ lyef-react create myComponent willianjusten "Single Component" 0.0.1'); 18 | console.log(' $ lyef-react create myComponent'); 19 | console.log(''); 20 | }); 21 | 22 | program.parse(process.argv) 23 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lyef-react-cli", 3 | "version": "0.0.1", 4 | "lockfileVersion": 1, 5 | "dependencies": { 6 | "ansi-regex": { 7 | "version": "2.1.1", 8 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", 9 | "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" 10 | }, 11 | "ansi-styles": { 12 | "version": "2.2.1", 13 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", 14 | "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" 15 | }, 16 | "arr-diff": { 17 | "version": "2.0.0", 18 | "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", 19 | "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=" 20 | }, 21 | "arr-flatten": { 22 | "version": "1.0.3", 23 | "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz", 24 | "integrity": "sha1-onTthawIhJtr14R8RYB0XcUa37E=" 25 | }, 26 | "array-unique": { 27 | "version": "0.2.1", 28 | "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", 29 | "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" 30 | }, 31 | "balanced-match": { 32 | "version": "1.0.0", 33 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 34 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 35 | }, 36 | "brace-expansion": { 37 | "version": "1.1.8", 38 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", 39 | "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=" 40 | }, 41 | "braces": { 42 | "version": "1.8.5", 43 | "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", 44 | "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=" 45 | }, 46 | "chalk": { 47 | "version": "1.1.3", 48 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", 49 | "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=" 50 | }, 51 | "cli-cursor": { 52 | "version": "1.0.2", 53 | "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", 54 | "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=" 55 | }, 56 | "cli-spinners": { 57 | "version": "0.2.0", 58 | "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.2.0.tgz", 59 | "integrity": "sha1-hQeHN5E7iA9uyf/ntl6D7Hd2KE8=" 60 | }, 61 | "commander": { 62 | "version": "2.10.0", 63 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.10.0.tgz", 64 | "integrity": "sha512-q/r9trjmuikWDRJNTBHAVnWhuU6w+z80KgBq7j9YDclik5E7X4xi0KnlZBNFA1zOQ+SH/vHMWd2mC9QTOz7GpA==" 65 | }, 66 | "concat-map": { 67 | "version": "0.0.1", 68 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 69 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 70 | }, 71 | "core-util-is": { 72 | "version": "1.0.2", 73 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 74 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 75 | }, 76 | "escape-string-regexp": { 77 | "version": "1.0.5", 78 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 79 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" 80 | }, 81 | "exit-hook": { 82 | "version": "1.1.1", 83 | "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", 84 | "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=" 85 | }, 86 | "expand-brackets": { 87 | "version": "0.1.5", 88 | "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", 89 | "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=" 90 | }, 91 | "expand-range": { 92 | "version": "1.8.2", 93 | "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", 94 | "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=" 95 | }, 96 | "extend": { 97 | "version": "3.0.1", 98 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", 99 | "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" 100 | }, 101 | "extend-shallow": { 102 | "version": "2.0.1", 103 | "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", 104 | "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=" 105 | }, 106 | "extglob": { 107 | "version": "0.3.2", 108 | "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", 109 | "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", 110 | "dependencies": { 111 | "is-extglob": { 112 | "version": "1.0.0", 113 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", 114 | "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" 115 | } 116 | } 117 | }, 118 | "filename-regex": { 119 | "version": "2.0.1", 120 | "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", 121 | "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" 122 | }, 123 | "fill-range": { 124 | "version": "2.2.3", 125 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", 126 | "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=" 127 | }, 128 | "for-in": { 129 | "version": "1.0.2", 130 | "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", 131 | "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" 132 | }, 133 | "for-own": { 134 | "version": "0.1.5", 135 | "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", 136 | "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=" 137 | }, 138 | "glob": { 139 | "version": "5.0.15", 140 | "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", 141 | "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=" 142 | }, 143 | "glob-base": { 144 | "version": "0.3.0", 145 | "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", 146 | "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", 147 | "dependencies": { 148 | "glob-parent": { 149 | "version": "2.0.0", 150 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", 151 | "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=" 152 | }, 153 | "is-extglob": { 154 | "version": "1.0.0", 155 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", 156 | "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" 157 | }, 158 | "is-glob": { 159 | "version": "2.0.1", 160 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", 161 | "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=" 162 | } 163 | } 164 | }, 165 | "glob-parent": { 166 | "version": "3.1.0", 167 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", 168 | "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=" 169 | }, 170 | "glob-stream": { 171 | "version": "5.3.5", 172 | "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", 173 | "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=" 174 | }, 175 | "graceful-readlink": { 176 | "version": "1.0.1", 177 | "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", 178 | "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" 179 | }, 180 | "has-ansi": { 181 | "version": "2.0.0", 182 | "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", 183 | "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=" 184 | }, 185 | "humanize-component": { 186 | "version": "0.1.0", 187 | "resolved": "https://registry.npmjs.org/humanize-component/-/humanize-component-0.1.0.tgz", 188 | "integrity": "sha1-4jL5IJfanXYcboBJ3nqVQtrZoJw=" 189 | }, 190 | "inflight": { 191 | "version": "1.0.6", 192 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 193 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" 194 | }, 195 | "inherits": { 196 | "version": "2.0.3", 197 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 198 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 199 | }, 200 | "is-buffer": { 201 | "version": "1.1.5", 202 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", 203 | "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" 204 | }, 205 | "is-dotfile": { 206 | "version": "1.0.3", 207 | "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", 208 | "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" 209 | }, 210 | "is-equal-shallow": { 211 | "version": "0.1.3", 212 | "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", 213 | "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=" 214 | }, 215 | "is-extendable": { 216 | "version": "0.1.1", 217 | "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", 218 | "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" 219 | }, 220 | "is-extglob": { 221 | "version": "2.1.1", 222 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 223 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" 224 | }, 225 | "is-glob": { 226 | "version": "3.1.0", 227 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", 228 | "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=" 229 | }, 230 | "is-number": { 231 | "version": "2.1.0", 232 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", 233 | "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=" 234 | }, 235 | "is-posix-bracket": { 236 | "version": "0.1.1", 237 | "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", 238 | "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" 239 | }, 240 | "is-primitive": { 241 | "version": "2.0.0", 242 | "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", 243 | "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" 244 | }, 245 | "is-stream": { 246 | "version": "1.1.0", 247 | "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", 248 | "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" 249 | }, 250 | "isarray": { 251 | "version": "1.0.0", 252 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 253 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 254 | }, 255 | "isobject": { 256 | "version": "2.1.0", 257 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", 258 | "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=" 259 | }, 260 | "json-stable-stringify": { 261 | "version": "1.0.1", 262 | "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", 263 | "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=" 264 | }, 265 | "jsonify": { 266 | "version": "0.0.0", 267 | "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", 268 | "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" 269 | }, 270 | "kind-of": { 271 | "version": "3.2.2", 272 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", 273 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" 274 | }, 275 | "lodash._reinterpolate": { 276 | "version": "3.0.0", 277 | "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", 278 | "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" 279 | }, 280 | "lodash.camelcase": { 281 | "version": "4.3.0", 282 | "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", 283 | "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" 284 | }, 285 | "lodash.kebabcase": { 286 | "version": "4.1.1", 287 | "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", 288 | "integrity": "sha1-hImxyw0p/4gZXM7KRI/21swpXDY=" 289 | }, 290 | "lodash.template": { 291 | "version": "4.4.0", 292 | "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", 293 | "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=" 294 | }, 295 | "lodash.templatesettings": { 296 | "version": "4.1.0", 297 | "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz", 298 | "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=" 299 | }, 300 | "log-symbols": { 301 | "version": "1.0.2", 302 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", 303 | "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=" 304 | }, 305 | "micromatch": { 306 | "version": "2.3.11", 307 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", 308 | "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", 309 | "dependencies": { 310 | "is-extglob": { 311 | "version": "1.0.0", 312 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", 313 | "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" 314 | }, 315 | "is-glob": { 316 | "version": "2.0.1", 317 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", 318 | "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=" 319 | } 320 | } 321 | }, 322 | "minimatch": { 323 | "version": "3.0.4", 324 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 325 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" 326 | }, 327 | "normalize-path": { 328 | "version": "2.1.1", 329 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", 330 | "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=" 331 | }, 332 | "object.omit": { 333 | "version": "2.0.1", 334 | "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", 335 | "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=" 336 | }, 337 | "once": { 338 | "version": "1.4.0", 339 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 340 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" 341 | }, 342 | "onetime": { 343 | "version": "1.1.0", 344 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", 345 | "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=" 346 | }, 347 | "ora": { 348 | "version": "0.3.0", 349 | "resolved": "https://registry.npmjs.org/ora/-/ora-0.3.0.tgz", 350 | "integrity": "sha1-NnoHitJc+wltpQERXrW0AeB9dJU=" 351 | }, 352 | "ordered-read-streams": { 353 | "version": "0.3.0", 354 | "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", 355 | "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=" 356 | }, 357 | "parse-glob": { 358 | "version": "3.0.4", 359 | "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", 360 | "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", 361 | "dependencies": { 362 | "is-extglob": { 363 | "version": "1.0.0", 364 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", 365 | "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" 366 | }, 367 | "is-glob": { 368 | "version": "2.0.1", 369 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", 370 | "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=" 371 | } 372 | } 373 | }, 374 | "path-dirname": { 375 | "version": "1.0.2", 376 | "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", 377 | "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" 378 | }, 379 | "path-is-absolute": { 380 | "version": "1.0.1", 381 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 382 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 383 | }, 384 | "preserve": { 385 | "version": "0.2.0", 386 | "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", 387 | "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" 388 | }, 389 | "process-nextick-args": { 390 | "version": "1.0.7", 391 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", 392 | "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" 393 | }, 394 | "randomatic": { 395 | "version": "1.1.7", 396 | "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", 397 | "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", 398 | "dependencies": { 399 | "is-number": { 400 | "version": "3.0.0", 401 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", 402 | "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", 403 | "dependencies": { 404 | "kind-of": { 405 | "version": "3.2.2", 406 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", 407 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" 408 | } 409 | } 410 | }, 411 | "kind-of": { 412 | "version": "4.0.0", 413 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", 414 | "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=" 415 | } 416 | } 417 | }, 418 | "readable-stream": { 419 | "version": "2.3.2", 420 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.2.tgz", 421 | "integrity": "sha1-WgTfBeT1f+Pw3Gj90R3FyXx+b00=" 422 | }, 423 | "regex-cache": { 424 | "version": "0.4.3", 425 | "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", 426 | "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=" 427 | }, 428 | "remove-trailing-separator": { 429 | "version": "1.0.2", 430 | "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", 431 | "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=" 432 | }, 433 | "repeat-element": { 434 | "version": "1.1.2", 435 | "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", 436 | "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" 437 | }, 438 | "repeat-string": { 439 | "version": "1.6.1", 440 | "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", 441 | "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" 442 | }, 443 | "restore-cursor": { 444 | "version": "1.0.1", 445 | "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", 446 | "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=" 447 | }, 448 | "safe-buffer": { 449 | "version": "5.1.1", 450 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", 451 | "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" 452 | }, 453 | "string_decoder": { 454 | "version": "1.0.3", 455 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", 456 | "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==" 457 | }, 458 | "strip-ansi": { 459 | "version": "3.0.1", 460 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", 461 | "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=" 462 | }, 463 | "supports-color": { 464 | "version": "2.0.0", 465 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", 466 | "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" 467 | }, 468 | "through2": { 469 | "version": "0.6.5", 470 | "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", 471 | "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", 472 | "dependencies": { 473 | "isarray": { 474 | "version": "0.0.1", 475 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", 476 | "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" 477 | }, 478 | "readable-stream": { 479 | "version": "1.0.34", 480 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", 481 | "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=" 482 | }, 483 | "string_decoder": { 484 | "version": "0.10.31", 485 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", 486 | "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" 487 | } 488 | } 489 | }, 490 | "through2-filter": { 491 | "version": "2.0.0", 492 | "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", 493 | "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", 494 | "dependencies": { 495 | "through2": { 496 | "version": "2.0.3", 497 | "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", 498 | "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=" 499 | } 500 | } 501 | }, 502 | "through2-map": { 503 | "version": "2.0.0", 504 | "resolved": "https://registry.npmjs.org/through2-map/-/through2-map-2.0.0.tgz", 505 | "integrity": "sha1-RphGcuLC2KQeF29W+1db62TY7X4=", 506 | "dependencies": { 507 | "through2": { 508 | "version": "2.0.3", 509 | "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", 510 | "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=" 511 | } 512 | } 513 | }, 514 | "through2-reduce": { 515 | "version": "1.1.1", 516 | "resolved": "https://registry.npmjs.org/through2-reduce/-/through2-reduce-1.1.1.tgz", 517 | "integrity": "sha1-QCv5qWQO//9RNpkbx9xyoqdnJRw=", 518 | "dependencies": { 519 | "through2": { 520 | "version": "2.0.3", 521 | "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", 522 | "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=" 523 | } 524 | } 525 | }, 526 | "to-absolute-glob": { 527 | "version": "0.1.1", 528 | "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", 529 | "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=" 530 | }, 531 | "unique-stream": { 532 | "version": "2.2.1", 533 | "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", 534 | "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=" 535 | }, 536 | "util-deprecate": { 537 | "version": "1.0.2", 538 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 539 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 540 | }, 541 | "wrappy": { 542 | "version": "1.0.2", 543 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 544 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 545 | }, 546 | "xtend": { 547 | "version": "4.0.1", 548 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", 549 | "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" 550 | } 551 | } 552 | } 553 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lyef-react-cli", 3 | "version": "1.0.1", 4 | "description": "Command line tool for building decoupled and independent react components based on Lyef React Component.", 5 | "engines": { 6 | "node": ">= 0.10.26", 7 | "npm": ">=1.4.3" 8 | }, 9 | "author": "lyef", 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/lyef/lyef-react-cli.git" 13 | }, 14 | "bin": { 15 | "lyef-react": "./index.js" 16 | }, 17 | "keywords": [ 18 | "cli", 19 | "react", 20 | "command", 21 | "terminal" 22 | ], 23 | "license": "MIT", 24 | "bugs": { 25 | "url": "https://github.com/lyef/lyef-react-cli/issues" 26 | }, 27 | "homepage": "https://github.com/lyef/lyef-react-cli", 28 | "dependencies": { 29 | "commander": "^2.9.0", 30 | "glob-stream": "^5.3.2", 31 | "humanize-component": "^0.1.0", 32 | "lodash.camelcase": "^4.3.0", 33 | "lodash.kebabcase": "^4.1.1", 34 | "lodash.template": "^4.3.0", 35 | "ora": "^0.3.0", 36 | "through2-map": "^2.0.0", 37 | "through2-reduce": "^1.1.1" 38 | } 39 | } 40 | --------------------------------------------------------------------------------