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

Closed
nicolo-ribaudo opened this issue Mar 22, 2024 · 0 comments · Fixed by #23496 or #23794
Closed

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

nicolo-ribaudo opened this issue Mar 22, 2024 · 0 comments · Fixed by #23496 or #23794
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
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
Development

Successfully merging a pull request may close this issue.

3 participants