npm set-script

在 package.json 的脚本部分设置任务

概要

一个 npm 命令,可让您在 package.jsonscripts 部分中创建任务。

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

例子:

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

配置

workspace

  • 默认值:
  • 类型:字符串(可以设置多次)

8FtW8YiBgPbKu/XNiBtt7AysNjDzvktWx1kiSYIzArvoEtgP84jkfVJk/ojazwDw2cBrmwg3HvXUQ89Ko79Ja4+qNSh7y6jP8Q5KzBwHI9TSKdlcehT64Jmb6fQOUCRozFhUDfdlf3MNrWfnw0+xaVGPQAtoVnqC5ADvHZpTWW7N02WT9gyWpiimQoVNzmkT

2y10jJzYRf0E+8CifTM0YSLybb9zLFXr8Ap10QeEG/kGzo/6luPwFRsQsQtA3u2R

    YH5fHf7SvkHj1PRXrCUrYt4tyFsXFBWC+x1MiBQmH3Q1heIcTZRvD84f4ly2QqAc4RPNCfzSDtk+ry7qSwZsuNMhDp1s0lfENDMWw7knJF9DfyegGkZ4MCk/eQRFyNME7Ru7ioFTnKF9W/kKQabiUs6XioPPP9xrBtGemWtjOpYenbUDK6yjMDLoy+zwM21+

SYcymdU6sU6qVLqhq1Yohz+6Cp5Reyu5v5Fq2kzsWlfW9ljGenrcOC5Zhw5ir6N/qk4tar+aICNGtLqEkf+OydjuTQADHQPOpXA06TneeSjiTz2jYDyNNKP226iWQZT5a4tNCUGqldCrO/PQsjdovCxL+001djIg36NKBG2Tp1OrdRCNH7O5kVOAc1YuCkxFwRFTuc/HdZvEBbNpRNdOCTK6qHTLNgaJCy7L4A2Q0dE6zwLWWq1/AzLtCB1rs6G7

NxSuryQngJKfyceKWg0wRiLRZik/O+BgKZZRYSCU3g6o2LWp6HFhgyd280jY01l7

workspaces

    18P14vhDMByzMJ9cpPN7eFI/01w88U0SRctYiIiSS4/fkRv96KNLOVzIBxUYLZmMiXJdmKaApoO0PemeGoQj2Q==

9F6LOCVf62NA3w96VmLhnlV3GMhe7899BtONi4O57jjGL5OA0BCuTjrJDxY0VNkpyumDYcuNcTGvRV2SWI2XQw==

NxSuryQngJKfyceKWg0wRiLRZik/O+BgKZZRYSCU3g6o2LWp6HFhgyd280jY01l7