0.1.1 • Published 9 years ago

generator-libstart v0.1.1

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

LibStart

Yeoman generator to start your UMD library.

npm version Build Status Join the chat at https://gitter.im/yoannmoinet/generator-libstart


Getting Started

If you'd like to get to know Yeoman better check out the complete Getting Started Guide.


Overview

This generator will create a basic scaffolding of a generic UMD library.

It will come with :


Install

To install generator-libstart from npm, run:

npm install -g yo generator-libstart

Finally, initiate the generator:

yo libstart

Usage

To generate your new library simply run :

yo libstart <name of your creation>

Answer to some questions and you're good to go.

You'll be able to reserve your library's name into npm's registry if you whish to.

In your new library, you'll have some scripts available to automate your development.

Npm Scripts

npm preversion (auto)

It runs npm build.

npm postversion (auto)

It runs bowerSync and changelog.

npm pretest (auto)

It runs build.

npm test (manual)

It launches tests with mocha.

npm postest (auto)

It runs format and lint.

Custom Scripts

They are all run by the previous npm scripts but you can run them at your convenience.

npm run prebuild (manual)

It runs format and lint.

npm run build (manual)

It runs umd and uglify.

npm run format

Test the formatting with JSCS

npm run lint

Lint with ESLint

npm run umd

It packages your library with umd

npm run changelog

Generate a changelog for your library based on your commits if you've followed one of the supported convention, and will commit the changes automatically.

npm run bowerSync

It synchronizes bower.json's version with package.json's, and will commit the changes automatically.

npm run uglify

It uglifies your library.


Structure

library
├ .eslintrc           // Basic ESLint config
├ .editorconfig       // Basic Editor config
├ .jscsrc             // Basic JSCS config
├ README.md
├ LICENSE
├ package.json
├ bower.json
│
└─── bin               // Helpers for npm scripts
|    ├ changelog.js    // Is run with 'npm run changelog'
|    └ bowerSync.js    // Is run with 'npm postversion'
|
└─── src
|    └ lib.js          // Main file
|
└─── test
     └ lib.spec.js     // Mocha tests

License

MIT

0.1.1

9 years ago

0.1.0

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago