Add support for bunjs
Hey, thanks for the excellent library. I enjoyed using it a lot.
This PR introduces a small patch to allow bun to handle package installs and tailwind commands. I wasn't sure of the reason for split tasks.clj between libs/tasks and tasks/, but I decided to respect it and copy-paste some of the code. All previous methods (local binary, npm) are unchanged. Any feedback/suggestions welcome, of course.
Thanks, I'll try to test this out + merge soon. the tasks/ folder is for the old babashka tasks before I switched over to using plain clj for the tasks; no need to touch that folder.
I added a couple commits:
- I reverted the changes to the old babashka tasks file and added some comments for future contributors
- I rewote some of the bun stuff to make it work on windows (removed the
grepcall) - also when deciding whether to do
npm installorbun install, instead of doing the latter ifbunis on the path, I made it check if thebun.lockbfile exists. This way the decision is made per-project. I'm not too familiar with bun but that seemed like a reliable approach--let me know if not.
Just made a tag for this. You can upgrade your :aliases -> :dev biff dependency to :git/tag "v1.8.24", :git/sha "a1e9b8c"
I added a couple commits:
- I reverted the changes to the old babashka tasks file and added some comments for future contributors
- I rewote some of the bun stuff to make it work on windows (removed the
grepcall)- also when deciding whether to do
npm installorbun install, instead of doing the latter ifbunis on the path, I made it check if thebun.lockbfile exists. This way the decision is made per-project. I'm not too familiar with bun but that seemed like a reliable approach--let me know if not.
Thanks for taking care of all of that. Checking for the lock file is a good change as after making that PR I realized many folks could have both bundlers installed on their machines. Better to see what was used in the project previously