mirror of
https://github.com/jbranchaud/til
synced 2026-08-31 16:51:46 +00:00
Add npm run Has Some Typo Aliases as a JavaScript TIL
This commit is contained in:
@@ -10,7 +10,7 @@ working across different projects via [VisualMode](https://www.visualmode.dev/).
|
|||||||
|
|
||||||
For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter).
|
For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter).
|
||||||
|
|
||||||
_1864 TILs and counting..._
|
_1865 TILs and counting..._
|
||||||
|
|
||||||
See some of the other learning resources I work on:
|
See some of the other learning resources I work on:
|
||||||
|
|
||||||
@@ -651,6 +651,7 @@ If you've learned something here, support my efforts writing daily TILs by
|
|||||||
- [Matching Multiple Values In A Switch Statement](javascript/matching-multiple-values-in-a-switch-statement.md)
|
- [Matching Multiple Values In A Switch Statement](javascript/matching-multiple-values-in-a-switch-statement.md)
|
||||||
- [Mock A Function With Return Values Using Jest](javascript/mock-a-function-with-return-values-using-jest.md)
|
- [Mock A Function With Return Values Using Jest](javascript/mock-a-function-with-return-values-using-jest.md)
|
||||||
- [New Dates Can Take Out Of Bounds Values](javascript/new-dates-can-take-out-of-bounds-values.md)
|
- [New Dates Can Take Out Of Bounds Values](javascript/new-dates-can-take-out-of-bounds-values.md)
|
||||||
|
- [`npm run` Has Some Typo Aliases](javascript/npm-run-has-some-typo-aliases.md)
|
||||||
- [Numbers Are Empty](javascript/numbers-are-empty.md)
|
- [Numbers Are Empty](javascript/numbers-are-empty.md)
|
||||||
- [Object Initialization With Shorthand Property Names](javascript/object-initialization-with-shorthand-property-names.md)
|
- [Object Initialization With Shorthand Property Names](javascript/object-initialization-with-shorthand-property-names.md)
|
||||||
- [Obtain Undefined Value With The Void Operator](javascript/obtain-undefined-value-with-the-void-operator.md)
|
- [Obtain Undefined Value With The Void Operator](javascript/obtain-undefined-value-with-the-void-operator.md)
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
# `npm run` Has Some Typo Aliases
|
||||||
|
|
||||||
|
The developers of the `npm` CLI know that sometimes we are trying to run
|
||||||
|
commands in a hurry. It's easy to be trying to type `npm run` and instead type
|
||||||
|
`npm rum` or `npm urn`. No worries though, the command will still work.
|
||||||
|
|
||||||
|
If I run `npm help run`, I'll see a manpage that opens with the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
NPM-RUN(1) NPM-RUN(1)
|
||||||
|
|
||||||
|
NAME
|
||||||
|
npm-run - Run arbitrary package scripts
|
||||||
|
|
||||||
|
Synopsis
|
||||||
|
npm run <command> [-- <args>]
|
||||||
|
|
||||||
|
aliases: run-script, rum, urn
|
||||||
|
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
Notice it lists a few _aliases_ including `rum` and `urn`.
|
||||||
|
|
||||||
|
Here are two examples of me running my test suite with `rum` and then `urn`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
❯ npm rum test:run
|
||||||
|
|
||||||
|
> test:run
|
||||||
|
> vitest run
|
||||||
|
|
||||||
|
|
||||||
|
RUN v3.0.7 /Users/lastword/dev/jbranchaud/still
|
||||||
|
|
||||||
|
✓ app/javascript/utils/urlUtils.test.js (6 tests) 2ms
|
||||||
|
✓ app/javascript/utils/clipboardImage.test.js (20 tests) 3ms
|
||||||
|
|
||||||
|
Test Files 2 passed (2)
|
||||||
|
Tests 26 passed (26)
|
||||||
|
Start at 22:07:53
|
||||||
|
Duration 298ms (transform 17ms, setup 0ms, collect 22ms, tests 5ms, environment 270ms, prepare 63ms)
|
||||||
|
|
||||||
|
|
||||||
|
❯ npm urn test:run
|
||||||
|
|
||||||
|
> test:run
|
||||||
|
> vitest run
|
||||||
|
|
||||||
|
|
||||||
|
RUN v3.0.7 /Users/lastword/dev/jbranchaud/still
|
||||||
|
|
||||||
|
✓ app/javascript/utils/urlUtils.test.js (6 tests) 3ms
|
||||||
|
✓ app/javascript/utils/clipboardImage.test.js (20 tests) 3ms
|
||||||
|
|
||||||
|
Test Files 2 passed (2)
|
||||||
|
Tests 26 passed (26)
|
||||||
|
Start at 22:07:58
|
||||||
|
Duration 305ms (transform 20ms, setup 0ms, collect 25ms, tests 6ms, environment 269ms, prepare 61ms)
|
||||||
|
```
|
||||||
|
|
||||||
|
See `npm help run` for more details.
|
||||||
Reference in New Issue
Block a user