Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 885 Bytes

npm-set-script.md

File metadata and controls

47 lines (33 loc) · 885 Bytes
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"
  }
}

Configuration

workspaces

Enables workspaces context. Tasks will be created in the scripts section of the package.json of each workspace.

workspace

Enables workspaces context and limits creating a task to the package.json files of the workspaces given.

See Also