Alt description missing in image

add-script

npm run add:script

Interactive, or with args (positional or named; --args optional):

npm run add:script -- --args <workspacePath> <scriptName> <scriptFileName>
npm run add:script -- features/@app-core my:script myScript.ts
npm run add:script -- --workspacePath features/@app-core --scriptName my:script --scriptFileName myScript.ts
        • add-script.ts

Prompt Arguments

ArgumentTypeQuestion / Description
workspacePathautocompleteWhere would you like to add this script?
=> e.g. features/@app-core
scriptNametextWhat is the script name?
=> string
scriptFileNametextWhat should we name the script file?
=> string

Resulting File Changes

/{workspacePath}/ # <- e.g. 'features/@app-core/' or 'packages/some-package/'
  └── scripts/
      └── {scriptFileName}.ts ❇️
  └── package.json # <- adds the script to the package.json scripts section
 
package.json # <- adds a root package.json script as well
turbo.json # <- adds a turbo.json monorepo script config entry