Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there an options for --prefix? #228

Closed
stoplion opened this issue Feb 11, 2021 · 0 comments
Closed

Is there an options for --prefix? #228

stoplion opened this issue Feb 11, 2021 · 0 comments

Comments

@stoplion
Copy link

stoplion commented Feb 11, 2021

  • nps 5.10.0:
  • node v15.4.0:
  • npm 7.5.0:

Scripts file (or at least the relevant bits):

Sits in /server

scripts:
  server:
    start: node ./build/index.js
    build: tsc
    watch: tsc -w
    debug: node --inspect-brk ./build/index.js

Sits in root

scripts:
  server:
    start: nps "server:start  --prefix server/"
    debug: nps "server:debug --prefix server/"
    watch: nps "server:watch --prefix server/"
    build: nps "server:build --prefix server/"

The main package.json (the one sitting in root) was able to run scripts in subfolders using the --prefix option.
I'm trying to reproduce the same setup with nps. Is this possible?

When running the nps server.start from the the root dir in CLI, I'm attempting to trigger this: nps "server:start --prefix server/" which server:start from the package scripts in child folder.


Second Try

Trying with the config option to target a child package-scripts.json:
start: nps -c server/package-scripts.yml "server:start"

Also..

start: "nps -c server/package-scripts.yml server:start"

Results in Scripts must resolve to strings. There is no script that can be resolved from "server:start"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant