5 ms·
Just ran into a similar problem for creating an installation script for my project, Keagate (https://github.com/dilan-dio4/Keagate https://github.com/dilan-dio4
by dilan-dio4 4y ago
Just ran into a similar problem for creating an installation script for my project, Keagate (https://github.com/dilan-dio4/Keagate https://github.com/dilan-dio4/Keagate).
My solution was to use a bash installation script (https://github.com/dilan-dio4/Keagate/blob/main/packages/scripts/keagate.sh https://github.com/dilan-dio4/Keagate/blob/main/packages/scr...) that checks if Node and NPM is installed. If it not, it automatically installs them via NVMs one-liner (can be seen in the bash here: https://github.com/dilan-dio4/Keagate/blob/d7442118a4846daf33b5fab2e580a55fa2a63e91/packages/scripts/keagate.sh#L53 https://github.com/dilan-dio4/Keagate/blob/d7442118a4846daf3...). The script then invokes the rest of the project via node.
This creates a cross-platform, streamlined installation workflow that natively goes from Bash (eww) to Node (nice).