3 ms·
I made a small tool to automatically handle git/npm stuff without worries. Think of it as a automated tiny local CI, you just run "happy" and can rest easy know
by franciscop 4y ago
I made a small tool to automatically handle git/npm stuff without worries. Think of it as a automated tiny local CI, you just run "happy" and can rest easy knowing that in few seconds/minutes (depending on your build+tests+etc) the latest running version will be deployed in git/npm/etc:
npm install happy -g
$ happy
// Basically does:
- npm build (if package.json build available)
- npm lint (if package.json lint available)
- npm test (if package.json test available)
- git add . && git commit -m $MESSAGE || "Saved on $DATE"
- git pull
- git push
happy --now
// Same but omit the build+lint+test steps, ideal for e.g. a documentation change
happy --major | --minor | --patch | --publish 1.2.3
// Same but use `np` (install separately) to bump the {publish} version and publish it in npm
It is built to maintain many small Git/npm projects, which fits my usecase and needs perfectly. But it has some limitations ofc, like it works assuming small projects working on a single git branch so if you have any kind of more advanced git setup it won't work properly.