Skip to content

Latest commit

 

History

History
179 lines (134 loc) · 6.69 KB

README.md

File metadata and controls

179 lines (134 loc) · 6.69 KB

generator-microjs

Build Status Code GPA Dependency Status NPM Version IRC Channel Gitter GitTip

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
    • Dynamic based on the project configurations.
    • Pre-configured badges for:
      • Travis Build Status: Build Status
      • Code Quality GPA: Code GPA
      • Dependency Status: Dependency Status
      • NPM Version: NPM Version
      • NPM Downloads: NPM Downloads
      • IRC Channel: IRC Channel
      • Gitter Chat Room: Gitter
      • GitTip: GitTip
  • 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.

  1. Create an empty repository on GitHub.
  2. Clone it to your computer
  3. Go to your new project folder, run the microjs generator and answer the prompts.
  4. NPM 1. Update the description in your package.json file and add appropriate keywords. 1. Shrinkwrap your node.js modules using npm shrinkwrap -dev
  5. Travis 1. enable any build status notifications you want published. 1. enable publishing test coverage to code climate.
  6. Writing unit tests for your code.
  7. Implement your micro library or framework.
  8. Activate the repository in Travis.
  9. Push you initial commit to GitHub.
  10. Activate the repository on CodeClimate.
  11. Create a new release of your code on GitHub.
  12. Publish version to NPM with npm publish.
  13. Register your framework with Bower.

Options

  • --skip-install

    Defaults to true. Skips the automatic execution of bower and npm 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.