-
Notifications
You must be signed in to change notification settings - Fork 0
init
Subhajit Sahu edited this page Apr 24, 2021
·
7 revisions
Initializes a Node.js repository.
- Creates on GitHub.
- Clones to local directory.
- Populates with LICENSE and README.md.
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 <email> (url)
# -l, --license: license type (mit)
# -u, --username: github username
# -p, --password: github password
# Environment variables:
# NPM_INIT_YES: accept defaults (0/1)
# NPM_INIT_NAME: package name
# NPM_INIT_VERSION: start version (0.0.0)
# NPM_INIT_DESCRIPTION: package description
# NPM_INIT_MAIN: main script path (index.js)
# NPM_INIT_SCRIPTS_TEST: test script (exit)
# NPM_INIT_REPOSITORY: repository path ([https://github.com/]user/repo)
# NPM_INIT_KEYWORDS: comma separated keywords
# NPM_INIT_AUTHOR: author name <email> (url)
# NPM_INIT_LICENSE: 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 <[email protected]> (https://pp.github.io)" -r
# initialize with some prespecified options
$ enpm init --yes -v 0.1.0 -a [email protected] --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 [email protected] -r pp/paper
# initialize with given options and defaults (dont ask)