npm pkg set <field...>

Sets a value in your package.json based on the field value. It is possible to set multiple values and values for child fields

Arguments

NameDescription
fieldName of the field to set. You can set child fields by separating them with a period

Options

NameDescription
--jsonShow output in json format
-w, --workspace <workspace...>Enable running a command in the context of the configured workspaces of the current project
-ws, --workspacesEnable running a command in the context of all the configured workspaces
-f, --force
  • Dangerous 💥