generator-microjs
v0.1.2
Published
Scaffold out a micro library or framework using yeoman.
Downloads
15
Maintainers
Readme
generator-microjs
About
Quickly scaffold out a micro library or framework.
Features
- Pre-fills information using your GitHub account data.
- Checks if your new project name is already taken on NPM.
- Choose your preferred task runner framework.
- Choose your preferred unit test framework.
- Test coverage pre-configured to publish to code climate.
- Micro library template is pre-configured for AMD, Node.js and browser support.
- README file
- JSHint pre-configured to lint the source code and unit tests.
- Complexity Report pre-configured to analyze source code for maintainability.
- Karma pre-configured to run unit tests in your chosen framework.
- Travis CI configured for continuous integration.
- pre-configured to publish build status to your project IRC channel and gitter chat room.
- included
dot
files- .editorconfig
- .gitattributes
- .gitignore
- .jshintrc
- .npmignore
- .travis.yml
Setup
You'll need Yeoman installed if you don't have it already.
$ npm install -g yo
To install generator-microjs from npm, run:
$ npm install -g generator-microjs
Scaffolding
Go to your new project folder, run the generator and answer the prompts. The use --coffee
flag is optional.
$ yo microjs --coffee
Check List
Step-by-step for creating a new micro-lib. A LOT will be done for you, but there are some things you should customize in your newly scaffolded micro-library.
- Create an empty repository on GitHub.
- Clone it to your computer
- Go to your new project folder, run the
microjs
generator and answer the prompts. - NPM
1. Update the description in your
package.json
file and add appropriate keywords. 1. Shrinkwrap your node.js modules usingnpm shrinkwrap -dev
- Travis 1. enable any build status notifications you want published. 1. enable publishing test coverage to code climate.
- Writing unit tests for your code.
- Implement your micro library or framework.
- Activate the repository in Travis.
- Push you initial commit to GitHub.
- Activate the repository on CodeClimate.
- Create a new release of your code on GitHub.
- Publish version to NPM with
npm publish
. - Register your framework with Bower.
Options
--skip-install
Defaults to
true
. Skips the automatic execution ofbower
andnpm
after scaffolding has finished.--coffee
Defaults to
true
. Add support for CoffeeScript.
Updating
Use the following command to update to the latest version of generator-microjs.
$ npm update -g generator-microjs
Contributing
Pull requests welcome :)
TODO List
- add option for sass / css
- add option for creating a demo page
Testing
Unit tests for this generator are written in Mocha and can be run using npm test
.
License
(The MIT License)
Copyright (c) 2014 Daniel Lamb [email protected]
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.