-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add documentation to README for using Unibeautify as Node.js API #214
Comments
Unfortunately, Unibeautify must run within Node.js on a server, it does not work within the browser.
Unibeautify is already a npm package: https://yarnpkg.com/en/package/unibeautify 🎉
Can you provide some more details of what you're doing? Ideally, a repository we could build ourselves locally and following https://stackoverflow.com/help/mcve . |
Yes, I want to run it exactly that way. On node.js server. Not in the browser.
It provides CLI utility. I need to run it from my node.js script without using CLI.
That was about https://www.npmjs.com/package/prettier package. |
@SilentImp I think what you want is https://www.npmjs.com/package/unibeautify. You can call the methods in there using node. Docs here: https://api.unibeautify.com/ |
@stevenzeck oh, look like you are right. Main problem was (is) documentation and lack of examples in the main readme.md. If you also add the link to an example of how I may beautify string of code — I will be totally happy. But thank you kindly in any case. |
https://github.com/Unibeautify/vscode/blob/master/src/EditProvider.ts#L52-L86 is a good example. Mainly https://github.com/Unibeautify/vscode/blob/master/src/EditProvider.ts#L80-L83, you'll see that's where |
Thank you! |
@SilentImp : Pull Requests improving README are very welcome! |
Is your feature request related to a problem? Please describe.
Hi, I am parsing frontend articles and want to beautify snippets of code inside.
But I have no idea how to use it from node.js on a string of code.
Describe the solution you'd like
npm package with api would be awesome.
how did you do it in the playground?
Describe alternatives you've considered
prettier package for example. problem is that I have no idea about snippets language and it fails on some nasty piece of code from time to time.
Additional context
The text was updated successfully, but these errors were encountered: