#Slush-lib
slush node + mocha + chai + github + travis + npm
Contributor: @JoelCox
Install slush-lib
globally:
$ npm install -g slush-lib
Remember to install gulp
and slush
globally as well, if you haven't already:
$ npm install -g gulp slush
Create a new folder for your project:
$ mkdir my-slush-lib
Run the generator from within the new folder:
$ cd my-slush-lib && slush lib
##Features
slush-lib is a great tool for quickly creating a new library. This Generator comes with the following out of the box
- Testing integration using MochaJS and Chai.
- Github account integration.
- Travis account Integration.
- npm account integration.
#Sub-Generators
##Module Sub-Generator
The module sub-generator will create a new node-module in the requested directory. You will also be prompted for the type of pattern you would like to use in the module.
The Module Sub-Generator also comes with a test file in tests/
In order to create a new module run the following command.
slush lib:module <name>
###Prompts
Path | Will set the path of the module. |
Pattern | Set your desired inheritance Pattern. Class, Module, Singleton |
Private | Dynamically create private methods within the module. |
Public | Dynamically create public methods that will be used as an API.. |
NOTE: When setting the Private or Public Methods, if more than one, please comma separate each. For Example:
[?] Private Methods? one,two,three
###Flags You can bypass the prompts by simply passing --flags instead.
lib:module <name> --path --pattern --private --public
Path: Will set the path where you would like to module to be placed.
--path ./lib/somePath
Pattern: Will Set the Pattern Type.
--pattern
Private: Will create private functions within your module
NOTE If you are passing multiple function names, please comma separate them with NO SPACES
--private one,two,three
Public: Will create Public API functions for your module.
NOTE If you are passing multiple function names, please comma separate them with NO SPACES
--public one,two,three
Or use a string
--public 'one,two,three'
Slush is a tool that uses Gulp for project scaffolding.
Slush does not contain anything "out of the box", except the ability to locate installed slush generators and to run them with liftoff.
To find out more about Slush, check out the documentation.
See the CONTRIBUTING Guidelines
If you have any problem or suggestion please open an issue here.
The MIT License
Copyright (c) 2014, Joel Cox
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.