incompatibility with "npm run" and extra arguments
See original GitHub issueIf I have a script like "compile": "tsup ./app/cli.ts ./app/index.ts --metafile"
and want to pass in more args I can’t via the npm run command.
When passing in more args via npm run compile -- --external=@vmngr/libvir
they’re ignored since they’re passed in quoted.
❯ npm run compile -- --external=@vmngr/libvir
> @unraid/api@2.41.1 compile C:\Users\xo\code\unraid\api
> tsup ./app/cli.ts ./app/index.ts --metafile "--external=@vmngr/libvir"
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Pass command line args to npm scripts in package.json
Firstly runs npm run vumper <arg> . Whereby <arg> will be the shell argument passed via the CLI. It is referenced in the...
Read more >npx - npm Docs
Run a command from a local or remote npm package. ... affordances to maintain backwards compatibility with the arguments it accepted in previous...
Read more >Manage npm packages - Visual Studio (Windows)
For more information, package.json configuration. Right-click a package node to take one of the following actions: Install npm Package(s) Runs ...
Read more >Ubuntu Manpage: npm-exec - Run a command from a local or ...
To run a binary other than the named binary, specify one or more --package ... In contrast, due to npm's argument parsing logic,...
Read more >Mocha - the fun, simple, flexible JavaScript test framework
Mocha is a feature-rich JavaScript test framework running on Node.js and in the ... Error Codes; Editor Plugins; Examples; Testing Mocha; More Information ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To add to the pain, if this was in an
npm script
fordev
:tsup-node --onSuccess 'node -r source-map-support/register dist/index.js'
It obviously would have no way to pass dynamic CLI commands for
commanderjs
oryargs
vianpm run dev -- someArg
It works if you hard code the args:
tsup-node --onSuccess 'node -r source-map-support/register dist/index.js someArg'
But that makes CLI testing a minor inconvenience