npm

npm run

Runs a named package script, including applicable pre/post hooks. Review the script and dependencies before use. The example is the fixed local report fixture.

Formal Syntax & Structure

nodejs syntaxnodejs
npm run <command> [-- <args>]

Parameters & Attributes

NameTypeDescription
commandstringDeclared script name.
argsstring[]Arguments after -- forwarded to the named script.

Return Value

exit status

Reflects task success or failure.

Working Example

Example Snippetnodejs
npm --silent run report
Node.js Reference