-
Notifications
You must be signed in to change notification settings - Fork 239
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
[RRFC] ability to run scripts standalone, without their pre- and post- associates #158
Comments
I think this could also solve https://npm.community/t/ignore-scripts-ignores-all-scripts/1403 , being able to run |
I found 2 better sugar syntaxes until it is not implemented on core level {
"test--raw": "mocha",
"pretest": "<some flow that isn't always desired>",
"test": "npm run test--raw",
"start --raw": "node server",
"poststart": "open champagne",
"start": "npm run start\\ --raw"
} Besides, git uses |
@askirmas |
I explained a visual trick for human eyes until |
In that case, I use your technique often :-) about 240 of my projects all use |
But this hack makes package.json to look dirty. |
I don't think a single extra script looks "dirty", especially not compared to a bunch of extra double-dashes everywhere - but obviously the cleanest would be a way to do |
I think we can (easily?) write a script to read from the package.json and execute the command from local node_module or PATH in env according to archive what we want, once we made it, npm may adopt our impl into the core |
We have implemented #185 in the the v7 beta which does what is described here but with a different syntax:
|
Motivation ("The Why")
To provide a way to run npm script without the pre- and/or post- scripts
When
When running
npm run <script>
Where
npm cli
How
By passing flags for example:
npm run test --no-pre
, ornpm run test --no-post
, ornpm run test --no-pre-post
Current Behaviour
pre- and post- scripts cannot be skipped, workaround exist but clumsy, for example:
Desired Behaviour
npm run <script> --no-pre
npm run <script> --no-post
npm run <script> --no-pre-post
References
Was added by @beenotung there npm/cli#484
The text was updated successfully, but these errors were encountered: