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

Use preset with npx #40

Closed
hwaterke opened this issue Oct 17, 2019 · 5 comments
Closed

Use preset with npx #40

hwaterke opened this issue Oct 17, 2019 · 5 comments
Labels

Comments

@hwaterke
Copy link

Is it possible to use a preset with npx?
Or do I need to install both mrm and the preset globally?

@sapegin
Copy link
Owner

sapegin commented Oct 18, 2019

Never tried that but it may work. Do you have an example of a preset and a task you want to run?

@hwaterke
Copy link
Author

Sure, npx mrm prettier --preset hwaterke for example.
Prints Preset “hwaterke” not found.

It would be really nice if I could run a task from a preset without installing anything globally.

@sapegin
Copy link
Owner

sapegin commented Oct 23, 2019

I did a quick googling and looks like npx doesn't support that.

@hwaterke
Copy link
Author

Alright! I got to the same results.
Thanks for looking it up 😉

@filipekiss
Copy link
Contributor

@hwaterke I know it's been a while, but you could try:

npx --package mrm --package hwaterke -- mrm prettier --preset hwaterke

(I think you can omit --package mrm if you have mrm already installed globally)

Although, if you plan to use the preset frequently, it's best to globally install it since npx, in this case, will always download it

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

No branches or pull requests

3 participants