Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

[FEATURE] Support running npx in a specified directory (like npm --prefix) #74

Open
abbasyadollahi opened this issue Aug 12, 2020 · 4 comments

Comments

@abbasyadollahi
Copy link

What / Why

Being able to run npx from a parent folder would be more practical for a project with multiple sub projects.

How

Current Behavior

Currently it can be done in npm with npm --prefix path/to/dir run install.

Expected Behavior

It could run the same as npm does, ie npx --prefix path/to/sub yarn install.

References

It was a requested feature before under zkat.
zkat/npx#226

@ljharb
Copy link

ljharb commented Aug 13, 2020

Why not (cd path/to/sub && npx yarn install)?

@abbasyadollahi
Copy link
Author

abbasyadollahi commented Aug 17, 2020

That's what I'm currently doing, although I felt like it was more of an anti pattern.

@karfau
Copy link

karfau commented Aug 19, 2020

This might even already work with v7 of npm since npx will is going to be maintained as part of npm and is basically a shorthand for npm exec.

See #30

PS: If it doesn't work you might want to file this issue over there.

@adilsaju
Copy link

adilsaju commented Sep 9, 2020

https://stackoverflow.com/q/60739550/7486005

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants