-
Notifications
You must be signed in to change notification settings - Fork 13
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
Transition to Javascript API #6
Comments
I took a stab at converting this to the JS API over at my fork: https://github.com/saschatimme/julia-format This is not a one to one conversion from the existing implementation. Instead this now requires that users have a I converted one of my packages to this workflow: https://github.com/saschatimme/MixedSubdivisions.jl/tree/js-format Let me know what you think about this :) If you like my proposal I will open a PR. |
Thanks for doing this! Why not just have the installation and format call as part of the .yml workflow file. I think in the case of Documenter the folder structure makes sense:
There's probably more reasons, but, in the case of formatting we just install the package |
Ok, let me try to come up with your suggested version. One question though, do you want to keep the |
Maybe this is an orthogonal discussion to the switch to the JS api but I think there should be an official configuration file. See for example the prettier docs https://prettier.io/docs/en/configuration.html If you have a repository with multiple contributors it can otherwise become tiresome to explain again and again with which options to run the formatter. If this is hidden in some Github configuration file then it is not discoverable. Also I think for editor integrations this should make it easier to respect custom configurations. |
There's no reason to keep using the args thing in this case. I only did it that way before because that's the interface for bin/format.jl. If we can call the format function directly we might as well just call
|
Hmm, maybe we could have a workflow example for both? My suggestion being a lightweight version of yours. You can make a case for which either would be preferable. |
@saschatimme can you make a PR. I'd like to explore this approach. |
I am busy this week, but I hope to get a version working during the weekend. However, if you want to try this before feel free to just take my code :) |
ref #5
Apparently using the JS API makes this much faster and has more capabilities in general.
The text was updated successfully, but these errors were encountered: