LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

npm-author

configuration sets default author for new packages

TLDR

Set author name
$ npm config set init-author-name "[Your Name]"
copy
Set author email
$ npm config set init-author-email "[email@example.com]"
copy
Set author URL
$ npm config set init-author-url "[https://example.com]"
copy
View author config
$ npm config get init-author-name
copy

SYNOPSIS

npm config set init-author-field value

DESCRIPTION

npm-author is a configuration concept rather than a standalone subcommand: it refers to the `init-author-*` keys read by npm init (and npm create) when populating the `author` field of a new `package.json`.Setting these values with npm config set once — typically in the user-level `~/.npmrc` — saves retyping them every time a new package is initialized. They can also be set per-project via a local `.npmrc`.The underlying config keys are unset by default; if they are empty, `npm init` prompts for a value interactively.

PARAMETERS

init-author-name

Package author name.
init-author-email
Package author email.
init-author-url
Package author URL.
init-license
Default SPDX license id for new packages (default: `ISC`).
init-version
Default semver version for new packages (default: `1.0.0`).

CAVEATS

npm config subcommand. Affects npm init only. Global or per-project.

HISTORY

Author configuration is part of npm's init defaults system for package.json creation.

SEE ALSO

npm(1), npm-config(1), npm-init(1)

Copied to clipboard
Kai