TypedDevs / bashunit

A simple testing library for bash scripts. Test your bash scripts in the fastest and simplest way, discover the most modern bash testing library.
https://bashunit.typeddevs.com
MIT License
267 stars 21 forks source link

Consider publishing `bashunit` on the npm registry #244

Open h0adp0re opened 4 months ago

h0adp0re commented 4 months ago

In order to use bashunit conveniently and platform-independently in a JS project, I'd like to be able to install it via npm.

antonio-gg-dev commented 4 months ago

Good morning @h0adp0re !

Thank you very much for your suggestion, we'll take a look at it!

In the meantime, you might want to add this little script to your scripts section in your package.json file, this will make bashunit install automatically every time you run npm install, npm ci, etc...

package.json:

{
  "scripts": {
    "postinstall": "curl -s https://bashunit.typeddevs.com/install.sh | bash"
  }
}

You can even pin a specific version or change the installation directory to node_modules if you prefer, take a look at our documentation.

h0adp0re commented 4 months ago

Aha, that's a clever way of handling it, too. Thanks!

If you don't want to mess around with npm, maybe adding that snippet to the docs will suffice? It's a decent alternative.

Chemaclass commented 2 weeks ago

Thanks for the input, @h0adp0re ! I am not sure where or how to put it, but feel free to create a PR to add that snippet to the docs, and we can work out and improve it all together. Many thanks! 🙏