yak-shave v1.0.3
yak-shave
Initialise new npm modules without the yak shaving.
Inspired by the good work of hughsk and mattdesl.
Installation
Install easily using npm:
npm install -g yak-shave
Getting started
First, update your npm config if you haven't already:
# required
npm config set init.author.name "Your Name"
npm config set init.author.email "me@example.com"
npm config set init.author.github "your-github-handle"
# optional, defaults to your github
npm config set init.author.url "http://your-site.com/"
There are two ways to create a new module using this generator. First,
you can create a directory with the same name as the module you would
like to generate, enter it, and issue the yak-shave
command:
mkdir some-module
cd some-module
yak-shave
Second, you can pass in the name of the module you'd like to create and the generator will create the directory for you in the current path that you executed the command:
cd ~/projects
yak-shave some-module
NB: issuing the command yak-shave .
behaves the same as the
first approach.
The module generator will produce some generic files pre-populated for your specific module:
.gitignore
.jshintrc
.jshintignore
.npmignore
CHANGELOG.md
CONTRIBUTING.md
LICENSE
README.md
index.js
package.json
test.js
travis.yml
Usage
Usage: yak-shave [options] [name]
Options:
name The name of the module to generate. Defaults to the
name of the parent directory
-h, --help Show usage
-v, --version Show version number
-u, --user [user] Specify the user or organization that Github will
point to. Overrides the user settings in your npm
config, but maintains it for the author name and url
fields. This value will also be used within all
Github links and the LICENSE file.
Tests
The generator automatically creates an empty Tape test file to act as boilerplate for your module, as well as a default JSHint configuration and pre-commit hook to ensure that everything is in top form before committing any bad code for your newly generated module's repository.
License
MIT. See LICENSE for details.