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 local installations of beautifiers #120

Open
stevenzeck opened this issue Dec 12, 2018 · 9 comments
Open

Support local installations of beautifiers #120

stevenzeck opened this issue Dec 12, 2018 · 9 comments
Assignees

Comments

@stevenzeck
Copy link
Contributor

From @cdfa on December 11, 2018 13:49

Is your feature request related to a problem? Please describe.
Yes, I was trying to get this working for a project where in which the dev-dependencies state everything I'm using to develop the project except for editor specific stuff, but unibeautify seems to be unable to find beautifiers (like beautifier-js-beautify) when they are installed locally.

Describe the solution you'd like
Support locally installed beautifiers.

Describe alternatives you've considered

  • Having the beautifiers globally installed, but the other stuff locally, with a comment in the package.json saying the beautifiers need to be installed globally.

Additional context

Copied from original issue: Unibeautify/unibeautify#213

@stevenzeck stevenzeck self-assigned this Dec 12, 2018
@stevenzeck
Copy link
Contributor Author

@cdfa are you using the CLI, VSCode plugin or just calling it via Node?

@stevenzeck
Copy link
Contributor Author

From @cdfa on December 12, 2018 0:14

I was using the cli. When it's installed locally, I can run it with npx unibeautify.

@stevenzeck
Copy link
Contributor Author

OK, yes, the CLI only looks for globally installed beautifiers via g-search, then loads them via requireg. It would be an enhancement to add support for local installations.

@stevenzeck
Copy link
Contributor Author

@Glavin001 is there a package out there that searches or lists locally installed packages? I can't seem to find one.

@Glavin001
Copy link
Member

@stevenzeck
Copy link
Contributor Author

Not really. Looking for something like this, only it searches in local: https://github.com/TremayneChrist/npm-g-search. Guess we could borrow that code and modify it to our needs...

@cdfa
Copy link

cdfa commented Jan 2, 2019

Is running npx list <pkg-name> out of the question? Otherwise, looking at the way npx does it might be helpful.

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

No branches or pull requests

3 participants