# ./packages/FormRuntime/package-scripts.yml
scripts:
dev:
description: Local Development Mode
script: >-
npx parcel dev
lint: >-
npx eslint ./
test: >-
npx jest
watch:
description: run in the amazingly intelligent Jest watch mode
script: >-
jest --watch
build:
prod:
script: >-
parcel build
The command executed:
yarn nps formruntime lint
or
npx nps formruntime lint
The output:
> yarn nps formruntime lint
yarn run v1.22.5
$ C:\Storage\Projects\Forms\node_modules\.bin\nps formruntime lint
nps is executing `formruntime` : npx nps --config=./packages/FormRuntime/package-scripts.yml --
Usage: nps.js [options] <script>...
Commands:
nps.js init automatically migrate from npm scripts to nps
nps.js completion generate completion script
Options:
--config, -c Config file to use (defaults to nearest package-scripts.yml
or package-scripts.js)
[default: "C:\Storage\Projects\Forms\package-scripts.yml"]
--silent, -s Silent nps output [boolean] [default: false]
--log-level, -l The log level to use
[choices: "error", "warn", "info", "debug"] [default: "info"]
--prefix, -p Prefix for each script name
--require, -r Module to preload
--scripts Log command text for script [boolean] [default: true]
--help-style, -y Choose the level of detail displayed by the help command
[choices: "all", "scripts", "basic"] [default: "all"]
-v, --version Show version number [boolean]
Examples:
nps.js test build Runs the `test` script then the `build`
script
nps.js "test --cover" "build --prod" Runs the `test` script and forwards the
"--cover" flag then the `build` script
and forwards the "--prod" flag
Available scripts (camel or kebab case accepted)
dev - Local Development Mode - npx parcel dev
lint - npx eslint ./
test - npx jest
watch - run in the amazingly intelligent Jest watch mode - jest --watch
build.prod - parcel build
Scripts must resolve to strings. There is no script that can be resolved from "lint" https://github.com/sezna/nps/blob/master/other/ERRORS_AND_WARNINGS.md#missing-script
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Problem description:
want to split up monorepo tasks among their relevant areas
> npx nps
Usage: nps.js [options] <script>...
Commands:
nps.js init automatically migrate from npm scripts to nps
nps.js completion generate completion script
Options:
--config, -c Config file to use (defaults to nearest package-scripts.yml
or package-scripts.js)
[default: "C:\Storage\Projects\Forms\package-scripts.js"]
--silent, -s Silent nps output [boolean] [default: false]
--log-level, -l The log level to use
[choices: "error", "warn", "info", "debug"] [default: "info"]
--prefix, -p Prefix for each script name
--require, -r Module to preload
--scripts Log command text for script [boolean] [default: true]
--help-style, -y Choose the level of detail displayed by the help command
[choices: "all", "scripts", "basic"] [default: "all"]
-v, --version Show version number [boolean]
Examples:
nps.js test build Runs the `test` script then the `build`
script
nps.js "test --cover" "build --prod" Runs the `test` script and forwards the
"--cover" flag then the `build` script
and forwards the "--prod" flag
Available scripts (camel or kebab case accepted)
formruntime.dev - Local Development Mode - npx parcel dev
formruntime.lint - npx eslint ./
formruntime.test - npx jest
formruntime.watch - run in the amazingly intelligent Jest watch mode - jest --watch
formruntime.build.prod - parcel build
nps
version:node
version:npm
version:Scripts file (or at least the relevant bits):
The command executed:
or
The output:
Problem description:
want to split up monorepo tasks among their relevant areas
Suggested solution:
I actually came up with this wrapper:
lets me have these yaml files:
output becomes: