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

Add option to hide script description on nps execution #143

Closed
RichDonnellan opened this issue Jun 9, 2017 · 5 comments
Closed

Add option to hide script description on nps execution #143

RichDonnellan opened this issue Jun 9, 2017 · 5 comments

Comments

@RichDonnellan
Copy link

  • nps version: 5.3.1
  • node version: 8.1.0
  • npm version: 5.0.3

Problem description:
After executing nps, the script description is logged. This can clutter the displayed output if running lengthy scripts.

nps is executing `build`: `nps clean --config ${configFile} && concurrently --kill-others-
on-fail --prefix name --names \'COMPILE,BUILD\' --prefix-colors \'bgBlack.bold,bgCyan.bold\'
\'nps compile --config ${configFile}\' \'nps build --config ${configFile}\'`
nps is executing `compile`: `concurrently --kill-others-on-fail --prefix name --names \'SCSS,JS\'
--prefix-colors \'bgGreen.bold,bgRed.bold\' \'nps compile.scss --config ${configFile}\' \'nps
compile.js --config ${configFile}\'`

Suggested solution:
Add a --no-scripts flag to hide the description from the console.

"scripts": {
    "start": "nps --no-scripts"
}

Expected output:

nps is executing `build`
nps is executing `compile`

(Ref: #119 (comment))

@kentcdodds
Copy link
Collaborator

Sounds great. In addition, I'd like this to be configurable in options (like here) 👍

@kentcdodds
Copy link
Collaborator

With yargs, the option will be called scripts, will default to true and be a boolean type. This will allow you to use --no-scripts to turn it off.

@erikfox
Copy link
Contributor

erikfox commented Jul 12, 2017

@kentcdodds Is this ripe for pickup? Mind assigning to me?

@kentcdodds
Copy link
Collaborator

Thanks @erikfox! You're welcome to work on this one. I can't assign it to anyone who doesn't have commit access, but feel free to makeapullrequest.com for it 😄

erikfox added a commit to erikfox/nps that referenced this issue Jul 12, 2017
…output

Running a script will by default output the command text of the script to stdout, passing
--no-scripts will hide the command text.

sezna#143
erikfox added a commit to erikfox/nps that referenced this issue Jul 12, 2017
…output

Running a script will by default output the command text of the script to stdout, passing
--no-scripts will hide the command text.

sezna#143
@erikfox
Copy link
Contributor

erikfox commented Jul 12, 2017

@kentcdodds PR #150 is up and needs feedback!

erikfox added a commit to erikfox/nps that referenced this issue Jul 12, 2017
…output

Running a script will by default output the command text of the script to stdout, passing
--no-scripts will hide the command text.

sezna#143
erikfox added a commit to erikfox/nps that referenced this issue Jul 12, 2017
…output

Running a script will by default output the command text of the script to stdout, passing
--no-scripts will hide the command text.

sezna#143
erikfox added a commit to erikfox/nps that referenced this issue Jul 12, 2017
…output

Running a script will by default output the command text of the script to stdout, passing
--no-scripts will hide the command text.

sezna#143
erikfox added a commit to erikfox/nps that referenced this issue Jul 12, 2017
…output

Running a script will by default output the command text of the script to stdout, passing
--no-scripts will hide the command text.

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

No branches or pull requests

3 participants