Initialise new npm modules without the yak shaving.
Install easily using npm:
npm install -g yak-shave
First, update your npm config if you haven't already:
# requirednpm config set init.author.name "Your Name"npm config set init.author.email "firstname.lastname@example.org"npm config set init.author.github "your-github-handle"# optional, defaults to your githubnpm config set init.author.url ""
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
mkdir some-modulecd some-moduleyak-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 ~/projectsyak-shave some-module
NB: issuing the command
yak-shave . behaves the same as the
The module generator will produce some generic files pre-populated for your specific module:
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.
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.
MIT. See LICENSE for details.