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

Support running scripts that contain npm run with deno task #23036

Open
nicolo-ribaudo opened this issue Mar 22, 2024 · 0 comments · May be fixed by #23496
Open

Support running scripts that contain npm run with deno task #23036

nicolo-ribaudo opened this issue Mar 22, 2024 · 0 comments · May be fixed by #23496
Assignees
Labels
suggestion suggestions for new features (yet to be agreed) task runner related to deno task

Comments

@nicolo-ribaudo
Copy link

deno task is slowly becoming my go-to way of running package.json#scripts, even in Node.js projects, because I don't need to worry whether my dependencies are all installed or if I first have to run npm install.

It works for basic scripts, but it breaks in the case of a script calling another one through npm run (if you want an example, try running deno task build-loose and deno task build in https://github.com/tc39/proposal-defer-import-eval/). It would be great if it worked in that case, and I can think of three ways to do so:

  • blindly replace npm run with deno task in the executed command
  • alias npm to some intermediate program, that dispatches npm run to deno task and everything else unchanged to the real npm
  • create a .bin folder in the node_modules folder that Deno generates, so that the real npm is able to find the scripts it needs to run
@bartlomieju bartlomieju added suggestion suggestions for new features (yet to be agreed) task runner related to deno task labels Mar 22, 2024
This was referenced Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions for new features (yet to be agreed) task runner related to deno task
Projects
None yet
3 participants