-
I think that moon is doing a great job of providing a framework for defining tasks. I quite like the feature that allows toolchains to be installed and run. But it seems to me that I can then only use these tools within the context of moon tasks. But what if I want to use the tools on the command-line? Is there an easy way to add the moon installed tools to the path, for example? I found this recently when I tried to update the moon console extension for VSCode. I am not a typescript/node developer by nature, and so my system will not be generally set-up for this kind of programming. So having the moon tasks to do the basic build operations etc is just what I wanted - to build/test the project without any extra setup. But this became problematic when I introduced some linting/formatting errors and the instructions asked me to run some commands to fix the issues automatically, and I could not run those commands, because they were not on my path! To work around this, I quickly created a moon task to do it. Also, when using VS code or other IDEs, they also need to know where the tools are. But moon has them "hidden" away. Has anyone else have this problem, or am I a missing a trick here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@sharpepd moon uses proto under the hood for it's toolchain: https://moonrepo.dev/proto You can either install proto, or simply add |
Beta Was this translation helpful? Give feedback.
-
Thank you, that is helpful. I tried this in the moon/dev vscode-extension on my windows machine and found that adding the shims folder resulted in "Error: program not found". But when I removed that from the path and left ~/.proto/bin (or %USERPROFILE%/bin as it is Windows), I could find the node executable. But then I needed to also add "%CD%\node_modules.bin to get the binaries installed by the yarn process. With this I was then able to run prettier directly from the command line. In VSCode, we can make the terminal have these paths by adding them to the workspace settings: e.g.
|
Beta Was this translation helpful? Give feedback.
@sharpepd moon uses proto under the hood for it's toolchain: https://moonrepo.dev/proto
You can either install proto, or simply add
~/.proto/shims
and~/.proto/bin
to yourPATH
. This will make all those tools available to you.