From d30a9d75a5771446b5828bd9e644afd5edd3c3d8 Mon Sep 17 00:00:00 2001 From: Scott M Parrish Date: Sat, 23 Sep 2017 13:57:39 -0600 Subject: [PATCH 1/2] rename to blueprint. renamed source and test files changed require paths ignore references to repo, actual redux references and other projects's names changed a lot of references to .reduxrc --- .gitignore | 1 + design.md | 6 +- package.json | 15 +- readme.md | 142 +++++++++--------- ...edux-generate.js => blueprint-generate.js} | 4 +- src/cli/{redux-init.js => blueprint-init.js} | 0 src/cli/{redux-new.js => blueprint-new.js} | 4 +- src/cli/index.js | 4 +- src/models/blueprint.js | 2 +- src/models/project-settings.js | 8 +- src/sub-commands/init.js | 6 +- src/sub-commands/new.js | 4 +- templates/{.reduxrc => .blueprintrc} | 0 .../{argv.reduxrc => argv.blueprintrc} | 0 .../fixtures/{env.reduxrc => env.blueprintrc} | 0 test/models/project-settings.test.js | 14 +- 16 files changed, 107 insertions(+), 103 deletions(-) rename src/cli/{redux-generate.js => blueprint-generate.js} (91%) rename src/cli/{redux-init.js => blueprint-init.js} (100%) rename src/cli/{redux-new.js => blueprint-new.js} (79%) rename templates/{.reduxrc => .blueprintrc} (100%) rename test/fixtures/{argv.reduxrc => argv.blueprintrc} (100%) rename test/fixtures/{env.reduxrc => env.blueprintrc} (100%) diff --git a/.gitignore b/.gitignore index 1814834..bb74bfb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ npm-debug.log coverage/ tmp/ .reduxrc +.blueprintrc \ No newline at end of file diff --git a/design.md b/design.md index 920cdbf..6590f90 100644 --- a/design.md +++ b/design.md @@ -15,6 +15,8 @@ SubCommands. ## Design Decisions 2.0 +Rename to blueprint-cli + Take the foundation laid by 1.0 and extend the capabilities. Blueprints are most useful when able to be shared, copied and customized. @@ -25,8 +27,8 @@ Provide a way to copy blueprints into the default directory in order to increase the ease of customizing your own version of a default or shared blueprint. -Enhance the .reduxrc experience. Add the ability to have home directory -and ENV var defined locations. Allow merging of multiple .reduxrc files. +Enhance the .blueprintrc experience. Add the ability to have home directory +and ENV var defined locations. Allow merging of multiple .blueprintrc files. Allow defining blueprint directories in the file. Enhance the Generator experience. Look to Ruby on Rails for inspiration. diff --git a/package.json b/package.json index a4c5671..cf2531c 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "redux-cli", - "version": "2.0.0-0.1.0", + "version": "2.0.0-0.2.0", "description": "An opinionated CLI to make working on redux apps much faster.", - "main": "bin/redux.js", + "main": "bin/blu.js", "engine": { "node": ">=5.1" }, @@ -23,6 +23,7 @@ "redux", "react", "cli", + "blueprint", "generator", "react.js", "kit", @@ -33,11 +34,11 @@ "author": "Spencer Dixon ", "license": "MIT", "bin": { - "redux": "bin/redux.js", - "redux-init": "bin/redux-init.js", - "redux-generate": "bin/redux-generate.js", - "redux-g": "bin/redux-g.js", - "redux-new": "bin/redux-new.js" + "blueprint": "bin/blueprint.js", + "blueprint-init": "bin/blueprint-init.js", + "blueprint-generate": "bin/blueprint-generate.js", + "blueprint-g": "bin/blueprint-g.js", + "blueprint-new": "bin/blueprint-new.js" }, "dependencies": { "chalk": "^1.1.1", diff --git a/readme.md b/readme.md index 8e25654..815f6ad 100644 --- a/readme.md +++ b/readme.md @@ -5,28 +5,28 @@ ``` -______ _ _____ _ _____ +______ _ _____ _ _____ | ___ \ | | / __ \| | |_ _| -| |_/ /___ __| |_ ___ ________| / \/| | | | -| // _ \/ _` | | | \ \/ /______| | | | | | -| |\ \ __/ (_| | |_| |> < | \__/\| |_____| |_ -\_| \_\___|\__,_|\__,_/_/\_\ \____/\_____/\___/ +| |_/ /___ __| |_ ___ ________| / \/| | | | +| // _ \/ _` | | | \ \/ /______| | | | | | +| |\ \ __/ (_| | |_| |> < | \__/\| |_____| |_ +\_| \_\___|\__,_|\__,_/_/\_\ \____/\_____/\___/ ``` ## Quick Start ```javascript -npm i redux-cli -g // install redux-cli globally -redux new // create a new redux project -redux new -S // OR use ssh to pull project down (if ssh setup with github) -redux init // OR configure a current project to use the CLI +npm i redux-cli -g // install blueprint-cli globally +blueprint new // create a new blueprint project +blueprint new -S // OR use ssh to pull project down (if ssh setup with github) +blueprint init // OR configure a current project to use the CLI // Start generating components/tests and save time \(• ◡ •)/ //(g is alias for generate) -redux g dumb SimpleButton +blueprint g dumb SimpleButton ``` -![Redux CLI Usage Gif](redux-cli.gif) +![Blueprint CLI Usage Gif](redux-cli.gif) ## Table Of Contents @@ -41,17 +41,17 @@ redux g dumb SimpleButton 8. [Changelog](#changelog) ### Getting Started -Running `redux new ` will pull down the amazing [Redux Starter Kit](https://github.com/davezuko/react-redux-starter-kit) and -initialize a new git repo. Running `new` will automatically set up a `.reduxrc` +Running `blueprint new ` will pull down the amazing [Redux Starter Kit](https://github.com/davezuko/react-redux-starter-kit) and +initialize a new git repo. Running `new` will automatically set up a `.blueprintrc` to work with this specific starter kit. If you want to integrate the CLI in an existing project or store your components in different paths please see [config existing project](#config-existing-project) ### Config Existing Project There is an `init` subcommand for you to specify all paths to where components -live in your project. The `init` command just creates a `.reduxrc` in your -project root. If you want to you can just create the `.reduxrc` manually. +live in your project. The `init` command just creates a `.blueprintrc` in your +project root. If you want to you can just create the `.blueprintrc` manually. -Final `.reduxrc` might look like this: +Final `.blueprintrc` might look like this: ```javascript { @@ -61,18 +61,18 @@ Final `.reduxrc` might look like this: "dumbPath":"components", "fileCasing": "default" } -``` +``` -**Note on configuration**: +**Note on configuration**: This project tries to walk on a fine line between convention and configuration. Since the majority of React applications will separate their smart/dumb components if you pass in those paths you'll get those generators for free. However, some of the other generators might not write files to the exact paths that you use for your project. It's easy to override the CLI generators with -your own so that the generators will write files to the correct location. +your own so that the generators will write files to the correct location. [See: creating custom blueprints](#creating-blueprints). -Alternatively, if you use this CLI as a result of `redux new ` the +Alternatively, if you use this CLI as a result of `blueprint new ` the starter kit will come pre-configured with a bunch of blueprints (generators) that work out of the gate. Currently, I'm working on a PR for the `react-redux-starter-kit` with a bunch of blueprints. More starter kits and @@ -87,53 +87,53 @@ blueprints to come! |**dumbPath**|✓|where you keep your dumb (pure) components (relative of sourceBase)| |**fileCasing**|✓|how do you want generated files to be named (pascal/camel/snake/dashes/default)| -#### .reduxrc -It's possible to put `.reduxrc` files in other locations to better share -configs. It looks for files in the following locations and deep merges the -files it finds together. The defaultSettings will be overwritten by any -following options while the `--config=path/to/file` option will override -everything. +#### .blueprintrc +It's possible to put `.blueprintrc` files in other locations to better share +configs. It looks for files in the following locations and deep merges the +files it finds together. The defaultSettings will be overwritten by any +following options while the `--config=path/to/file` option will override +everything. -See the whole list and more ENV tricks -at [rc](https://github.com/dominictarr/rc) +See the whole list and more ENV tricks +at [rc](https://github.com/dominictarr/rc) 1. defaultSettings -2. /etc/redux/config -3. /etc/reduxrc -4. ~/.config/redux/config -5. ~/.config/redux -6. ~/.redux/config -7. ~/.reduxrc -9. $REDUX_CONFIG +2. /etc/blueprint/config +3. /etc/blueprintrc +4. ~/.config/blueprint/config +5. ~/.config/blueprint +6. ~/.blueprint/config +7. ~/.blueprintrc +9. $BLUEPRINT_CONFIG 10. --config=path/to/file -**Note** - All files found at these locations will have their objects deep +**Note** - All files found at these locations will have their objects deep merged together. Later file override earlier ones ### Commands |Command|Description|Alias| |---|---|---| -|`redux new `|creates a new redux project|| -|`redux init`|configure an existing redux app to use the CLI|| -|`redux generate `|generates files and tests for you automatically|`redux g`| -|`redux help g`|show all generators you have available|| +|`blueprint new `|creates a new blueprint project|| +|`blueprint init`|configure an existing blueprint app to use the CLI|| +|`blueprint generate `|generates files and tests for you automatically|`blueprint g`| +|`blueprint help g`|show all generators you have available|| ### Generators |Name|Description|Options| |---|---|---| -|`redux g dumb `|generates a dumb component and test file|| -|`redux g smart `|generates a smart connected component and test file|| -|`redux g form
`|generates a form component (assumes redux-form)|| -|`redux g duck `|generates a redux duck and test file|| +|`blueprint g dumb `|generates a dumb component and test file|| +|`blueprint g smart `|generates a smart connected component and test file|| +|`blueprint g form `|generates a form component (assumes redux-form)|| +|`blueprint g duck `|generates a redux duck and test file|| You can also see what files would get created with the `--dry-run` option like so: ``` -redux g dumb MyNewComponent --dry-run +blueprint g dumb MyNewComponent --dry-run // Output: @@ -147,36 +147,36 @@ redux g dumb MyNewComponent --dry-run Below are some examples of using the generator to speed up development: ``` -// generates a dumb component -redux g dumb SimpleButton +// generates a dumb component +blueprint g dumb SimpleButton -// generates a smart component -redux g smart CommentContainer +// generates a smart component +blueprint g smart CommentContainer // generate a redux-form with tags in render statement -redux g form ContactForm +blueprint g form ContactForm // generate a Redux 'duck' (reducer, constants, action creators) -redux g duck todos +blueprint g duck todos ``` ### Creating Blueprints -Blueprints are template generators with optional custom install logic. +Blueprints are template generators with optional custom install logic. -`redux generate` comes with a default set of blueprints. Every project has +`blueprint generate` comes with a default set of blueprints. Every project has their own configuration & needs, therefore blueprints have been made easy to override and extend. **Preliminary steps**: -1. Create a `blueprints` folder in your root directory. Redux CLI will search -for blueprints there _first_ before generating blueprints that come by default. +1. Create a `blueprints` folder in your root directory. Blueprint CLI will search +for blueprints there _first_ before generating blueprints that come by default. 2. Create a sub directory inside `blueprints` for the new blueprint OR use the -blueprint generator (super meta I know) that comes with Redux CLI by typing: -`redux g blueprint `. +blueprint generator (super meta I know) that comes with Blueprint CLI by typing: +`blueprint g blueprint `. 3. If you created the directory yourself than make sure to create a `index.js` file that exports your blueprint and a `files` folder with what you want -generated. +generated. **Customizing the blueprint**: @@ -199,29 +199,29 @@ blueprints/smart `files` contains templates for all the files to be generated into your project. -The `__name__` token is subtituted with the +The `__name__` token is subtituted with the entity name at install time. Entity names can be configued in either PascalCase, snake_case, camelCase, or dashes-case so teams can customize their file names accordingly. By default, the `__name__` will return whatever is entered in the generate CLI command. For example, when the user -invokes `redux g smart commentContainer` then `__name__` becomes +invokes `blueprint g smart commentContainer` then `__name__` becomes `commentContainer`. The `__root__` token is subsituted with the absolute path to your source. -Whatever path is in your `.reduxrc`'s `sourceBase` will be used here. +Whatever path is in your `.blueprintrc`'s `sourceBase` will be used here. The `__test__` token is substitued with the absolute path to your tests. -Whatever path is in your `.reduxrc`'s `testBase` will be used here. +Whatever path is in your `.blueprintrc`'s `testBase` will be used here. The `__path__` token is substituted with the blueprint name at install time. For example, when the user invokes -`redux generate smart foo` then `__path__` becomes -`smart`. +`blueprint generate smart foo` then `__path__` becomes +`smart`. The `__smart__` token is a custom token I added in the `index.js` it pulls from -your `.reduxrc` configuration file to use whatever you have set as your +your `.blueprintrc` configuration file to use whatever you have set as your `smartPath`. #### Template Variables (AKA Locals) @@ -252,7 +252,7 @@ export default <%= pascalEntityName %>; ``` `<%= pascalEntityName %>` is replaced with the real -value at install time. If we were to type: `redux g dumb simple-button` all +value at install time. If we were to type: `blueprint g dumb simple-button` all instances of `<%= pascalEntityName %>` would be converted to: `SimpleButton`. The following template variables are provided by default: @@ -270,7 +270,7 @@ described below. Custom installation (and soon uninstallation) behaviour can be added by overriding the hooks documented below. `index.js` should export a plain object, which will extend the prototype of the -`Blueprint` class. +`Blueprint` class. ```js module.exports = { @@ -321,7 +321,7 @@ containing general and entity-specific options. When the following is called on the command line: ```sh -redux g dumb foo --html=button --debug +blueprint g dumb foo --html=button --debug ``` The object passed to `locals` looks like this: @@ -378,7 +378,7 @@ blueprint's folder. Called before any of the template files are processed and receives the the `options` and `locals` hashes as parameters. Typically used for validating any additional command line options or for any asynchronous -setup that is needed. +setup that is needed. ### Contributing This CLI is very much in the beginning phases and I would love to have people @@ -403,8 +403,8 @@ npm start // to compile src into lib npm test // make sure all tests are passing // to test the cli in the local directory you can: -npm link // will install the npm package locally so you can run 'redux ' -redux +npm link // will install the npm package locally so you can run 'blueprint ' +blueprint ``` ### Package Utility Scripts: diff --git a/src/cli/redux-generate.js b/src/cli/blueprint-generate.js similarity index 91% rename from src/cli/redux-generate.js rename to src/cli/blueprint-generate.js index 72c906d..2baacdd 100644 --- a/src/cli/redux-generate.js +++ b/src/cli/blueprint-generate.js @@ -34,7 +34,7 @@ commander /* * blueprint arg structure: - * redux g dumb MyComponent --html=div + * blueprint g dumb MyComponent --html=div * { * entity: { * name: 'foo', @@ -44,7 +44,7 @@ commander * }, * rawArgs: [ * '/Users/spencerdixon/.nvm/versions/node/v5.1.0/bin/node', - '/Users/spencerdixon/.nvm/versions/node/v5.1.0/bin/redux-g', + '/Users/spencerdixon/.nvm/versions/node/v5.1.0/bin/blueprint-g', 'dumb', 'MyComponent', '--html', diff --git a/src/cli/redux-init.js b/src/cli/blueprint-init.js similarity index 100% rename from src/cli/redux-init.js rename to src/cli/blueprint-init.js diff --git a/src/cli/redux-new.js b/src/cli/blueprint-new.js similarity index 79% rename from src/cli/redux-new.js rename to src/cli/blueprint-new.js index 0f206f8..e80da04 100644 --- a/src/cli/redux-new.js +++ b/src/cli/blueprint-new.js @@ -10,8 +10,8 @@ commander.on('--help', () => { commander .arguments('') .option('-S, --use-ssh', 'Fetch starter kit over ssh') - .option('-B, --use-boilerplate', 'Fetch Redux-CLI boilerplate instead of react-redux-starter-kit') - .option('-U, --use-uikit', 'Fetch UI Kit boilerplate instead of react-redux-starter-kit') + .option('-B, --use-boilerplate', 'Fetch Blueprint-CLI boilerplate instead of react-blueprint-starter-kit') + .option('-U, --use-uikit', 'Fetch UI Kit boilerplate instead of react-blueprint-starter-kit') .action((dirName,command) => { subCommand.run({ dirName: dirName, diff --git a/src/cli/index.js b/src/cli/index.js index e57acb3..69311d9 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -7,10 +7,10 @@ program .version(version()); program - .command('init', 'initialize a .reduxrc file for project details'); + .command('init', 'initialize a .blueprintrc file for project details'); program - .command('new', 'creates a new redux project'); + .command('new', 'creates a new blueprint project'); // fake an alias for generate since commander doesn't support // aliases for sub-commands. diff --git a/src/models/blueprint.js b/src/models/blueprint.js index a0886cb..8863601 100644 --- a/src/models/blueprint.js +++ b/src/models/blueprint.js @@ -58,7 +58,7 @@ export default class Blueprint { ]; } // find blueprint given a path or return error - // look inside current project first and then redux-cli defaults + // look inside current project first and then blueprint-cli defaults static lookup(name, options = {}) { const lookupPaths = generateLookupPaths(options.paths); diff --git a/src/models/project-settings.js b/src/models/project-settings.js index 4c372c1..ffb3051 100644 --- a/src/models/project-settings.js +++ b/src/models/project-settings.js @@ -5,14 +5,14 @@ import rc from 'rc'; /* Look into using Yam for finding settings so it will get the first - .reduxrc it finds and use that for project settings just like how + .blueprintrc it finds and use that for project settings just like how eslintrc and ember-cli works. */ /* 2.0 TODO - Use rc to enable multiple .reduxrc files to be located and merged into a + Use rc to enable multiple .blueprintrc files to be located and merged into a single object. rc: https://www.npmjs.com/package/rc @@ -29,7 +29,7 @@ export default class ProjectSettings { // internal & tested // from #constructor loadSettings () { - this.settings = rc('redux', this.defaultSettings, this.args); + this.settings = rc('blueprint', this.defaultSettings, this.args); // if the config file list is empty, and the config is only the default // maybe save or prompt to save the default config file } @@ -38,7 +38,7 @@ export default class ProjectSettings { // #settingsExist // #save settingsPath () { - return path.join(pwd(), '.reduxrc'); + return path.join(pwd(), '.blueprintrc'); } //public & tested - maintain in 2.0 diff --git a/src/sub-commands/init.js b/src/sub-commands/init.js index 90d6219..2225075 100644 --- a/src/sub-commands/init.js +++ b/src/sub-commands/init.js @@ -15,7 +15,7 @@ class Init extends SubCommand { printUserHelp () { this.ui.write( - 'initialization command to create a .reduxrc which has project settings' + 'initialization command to create a .blueprintrc which has project settings' ); } @@ -24,13 +24,13 @@ class Init extends SubCommand { prompt.get(initPrompt, (err, result) => { this.ui.writeInfo('Saving your settings...'); this.settings.saveDefaults(result); - this.ui.writeCreate('.reduxrc with configuration saved in project root.'); + this.ui.writeCreate('.blueprintrc with configuration saved in project root.'); }); } cliLogo () { return success( - figlet.textSync('Redux-CLI', { + figlet.textSync('Blueprint-CLI', { font: 'Doom', horizontalLayout: 'default', verticalLayout: 'default' diff --git a/src/sub-commands/new.js b/src/sub-commands/new.js index 7152e25..3a8d052 100644 --- a/src/sub-commands/new.js +++ b/src/sub-commands/new.js @@ -77,11 +77,11 @@ class New extends SubCommand { // All settings for react-redux-starter-kit live in this template so when // new projects get created users can immediately start using the CLI createProjectSettings () { - this.ui.writeInfo('creating a default .reduxrc for your project'); + this.ui.writeInfo('creating a default .blueprintrc for your project'); const settings = new ProjectSettings(); settings.saveDefault(); - this.ui.writeCreate('.reduxrc with starter kit settings saved.'); + this.ui.writeCreate('.blueprintrc with starter kit settings saved.'); } } diff --git a/templates/.reduxrc b/templates/.blueprintrc similarity index 100% rename from templates/.reduxrc rename to templates/.blueprintrc diff --git a/test/fixtures/argv.reduxrc b/test/fixtures/argv.blueprintrc similarity index 100% rename from test/fixtures/argv.reduxrc rename to test/fixtures/argv.blueprintrc diff --git a/test/fixtures/env.reduxrc b/test/fixtures/env.blueprintrc similarity index 100% rename from test/fixtures/env.reduxrc rename to test/fixtures/env.blueprintrc diff --git a/test/models/project-settings.test.js b/test/models/project-settings.test.js index 42f3d78..acbab53 100644 --- a/test/models/project-settings.test.js +++ b/test/models/project-settings.test.js @@ -5,7 +5,7 @@ import config from 'config'; import { fileExists } from 'util/fs'; const {basePath} = config; -const settingsPath = basePath + '/.reduxrc'; +const settingsPath = basePath + '/.blueprintrc'; describe('ProjectSettings', () => { beforeEach(() => { @@ -19,13 +19,13 @@ describe('ProjectSettings', () => { // this is the local path. intended to be root of a particular directory describe('#settingsPath', () => { - it('returns current directory with .reduxrc appended', () => { + it('returns current directory with .blueprintrc appended', () => { expect(settings.settingsPath()).to.eql(settingsPath); }); }); describe('#loadSettings', () => { - it('loads settings from $CWD/.reduxrc', () => { + it('loads settings from $CWD/.blueprintrc', () => { fs.writeFileSync( settingsPath, JSON.stringify({test: 'works!'}) ); @@ -34,16 +34,16 @@ describe('ProjectSettings', () => { }); // inject a ENV variable and load settings. - it('loads settings from .reduxrc defined in process.env', () => { - process.env['redux_config'] = 'test/fixtures/env.reduxrc'; + it('loads settings from .blueprintrc defined in process.env', () => { + process.env['blueprint_config'] = 'test/fixtures/env.blueprintrc'; const settings = new ProjectSettings(); expect(settings.getSetting('envConfig')).to.eql('Environment'); // expect the file to be in the path of config files too }); // inject an ARGV and load settings. - it('loads settings from .reduxrc defined as ARGV', () => { - const fakeArgv = {config: basePath + '/test/fixtures/argv.reduxrc'}; + it('loads settings from .blueprintrc defined as ARGV', () => { + const fakeArgv = {config: basePath + '/test/fixtures/argv.blueprintrc'}; const defaultSettings = {defaultOption: true}; const argvSettings = new ProjectSettings(defaultSettings, fakeArgv); expect(argvSettings.getSetting('argvConfig')).to.eql('ARGV'); From 626bdf9681c93cdfb82f02bddc78c497d31ee4f0 Mon Sep 17 00:00:00 2001 From: Scott M Parrish Date: Sat, 23 Sep 2017 13:59:50 -0600 Subject: [PATCH 2/2] renamed bin files to blueprint added npm bin definitions to allow "bp" as command --- bin/blueprint-g.js | 3 +++ bin/blueprint-generate.js | 3 +++ bin/blueprint-init.js | 3 +++ bin/blueprint-new.js | 3 +++ bin/{redux.js => blueprint.js} | 1 - bin/redux-g.js | 3 --- bin/redux-generate.js | 3 --- bin/redux-init.js | 3 --- bin/redux-new.js | 3 --- package.json | 7 ++++++- 10 files changed, 18 insertions(+), 14 deletions(-) create mode 100755 bin/blueprint-g.js create mode 100755 bin/blueprint-generate.js create mode 100755 bin/blueprint-init.js create mode 100755 bin/blueprint-new.js rename bin/{redux.js => blueprint.js} (97%) delete mode 100755 bin/redux-g.js delete mode 100755 bin/redux-generate.js delete mode 100755 bin/redux-init.js delete mode 100755 bin/redux-new.js diff --git a/bin/blueprint-g.js b/bin/blueprint-g.js new file mode 100755 index 0000000..3f52dbd --- /dev/null +++ b/bin/blueprint-g.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +require('../lib/cli/blueprint-generate'); diff --git a/bin/blueprint-generate.js b/bin/blueprint-generate.js new file mode 100755 index 0000000..3f52dbd --- /dev/null +++ b/bin/blueprint-generate.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +require('../lib/cli/blueprint-generate'); diff --git a/bin/blueprint-init.js b/bin/blueprint-init.js new file mode 100755 index 0000000..cb384ce --- /dev/null +++ b/bin/blueprint-init.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +require('../lib/cli/blueprint-init'); diff --git a/bin/blueprint-new.js b/bin/blueprint-new.js new file mode 100755 index 0000000..23be514 --- /dev/null +++ b/bin/blueprint-new.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +require('../lib/cli/blueprint-new'); diff --git a/bin/redux.js b/bin/blueprint.js similarity index 97% rename from bin/redux.js rename to bin/blueprint.js index a834609..14dc5c3 100755 --- a/bin/redux.js +++ b/bin/blueprint.js @@ -1,3 +1,2 @@ #!/usr/bin/env node - require('../lib/cli'); diff --git a/bin/redux-g.js b/bin/redux-g.js deleted file mode 100755 index 05b5b35..0000000 --- a/bin/redux-g.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -require('../lib/cli/redux-generate'); diff --git a/bin/redux-generate.js b/bin/redux-generate.js deleted file mode 100755 index 436a751..0000000 --- a/bin/redux-generate.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -require('../lib/cli/redux-generate'); diff --git a/bin/redux-init.js b/bin/redux-init.js deleted file mode 100755 index 5702434..0000000 --- a/bin/redux-init.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -require('../lib/cli/redux-init'); diff --git a/bin/redux-new.js b/bin/redux-new.js deleted file mode 100755 index 2b0f95b..0000000 --- a/bin/redux-new.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -require('../lib/cli/redux-new'); diff --git a/package.json b/package.json index cf2531c..53c9d71 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,12 @@ "blueprint-init": "bin/blueprint-init.js", "blueprint-generate": "bin/blueprint-generate.js", "blueprint-g": "bin/blueprint-g.js", - "blueprint-new": "bin/blueprint-new.js" + "blueprint-new": "bin/blueprint-new.js", + "bp": "bin/blueprint.js", + "bp-init": "bin/blueprint-init.js", + "bp-generate": "bin/blueprint-generate.js", + "bp-g": "bin/blueprint-g.js", + "bp-new": "bin/blueprint-new.js" }, "dependencies": { "chalk": "^1.1.1",