extra-npm
Version:
Common utility commands for npm packages.
58 lines (47 loc) • 1.91 kB
Plain Text
Initializes a Node.js repository.
Creates on GitHub.
Clones to local directory.
Populates with LICENSE and README.md.
Similar: [push], [clone], [init].
enpm init [options]
--help: show this help
-y, --yes: accept defaults
-n, --name: package name
-v, --version: start version (0.0.0)
-d, --description: package description
-m, --main: main script path (index.js)
-st, --scripts_test: test script (exit)
-r, --repository: repository path ([https://github.com/]user/repo)
-k, --keywords: comma separated keywords
-a, --author: author name (url)
-l, --license: license type (mit)
-u, --username: github username
-p, --password: github password
Environment variables:
NPMINITYES: accept defaults (0/1)
NPMINITNAME: package name
NPMINITVERSION: start version (0.0.0)
NPMINITDESCRIPTION: package description
NPMINITMAIN: main script path (index.js)
NPMINITSCRIPTS_TEST: test script (exit)
NPMINITREPOSITORY: repository path ([https://github.com/]user/repo)
NPMINITKEYWORDS: comma separated keywords
NPMINITAUTHOR: author name (url)
NPMINITLICENSE: license type (mit)
GITHUB_USERNAME: github username
GITHUB_PASSWORD: github password
$ enpm init --repository
initialize package.json in current directory
$ enpm init --version 0.1.0 --author "Po Po (https://pp.github.io)" -r
initialize with some prespecified options
$ enpm init --yes -v 0.1.0 -a pp@baking.com --username pp --password ** -r https://github.com/pp/paper
initialize with given options and defaults (include github credentials)
$ export GITHUB_USERNAME=pp
$ export GITHUB_PASSWORD=**
$ enpm init --yes -v 0.1.0 -a pp@baking.com -r pp/paper
initialize with given options and defaults (dont ask)
References
npm init
[push]: https://github.com/nodef/extra-npm/wiki/push
[clone]: https://github.com/nodef/extra-npm/wiki/clone
[init]: https://github.com/nodef/extra-npm/wiki/init