node/deps/npm/docs/content/commands/npm-set-script.md
Ruy Adorno 8d8c7af1c0 deps: upgrade npm to 7.1.0
PR-URL: https://github.com/nodejs/node/pull/36395
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-12-09 15:17:41 +00:00

603 B

title section description
npm-set-script 1 Set tasks in the scripts section of package.json

Synopsis

An npm command that lets you create a task in the scripts section of the package.json.

npm set-script [<script>] [<command>]

Example:

  • npm set-script start "http-server ."
{
  "name": "my-project",
  "scripts": {
    "start": "http-server .",
    "test": "some existing value"
  }
}

See Also