This content originally appeared on DEV Community and was authored by Jairo Fernández
Build your ideas so fast!
https://www.npmjs.com/package/@ideascol/cli-maker
npx @ideascol/cli-maker
We are creating and improving cli-maker, and when I showed my partner the latest version, he said to me, “Hey man, you can’t see this advantage directly by looking at the create command or checking the readme.” So, I decided to write this simple and short (I hope) article.
Complete and simple CI configured
You just need to add a secret NPM_TOKEN to your repository. Now, when you create a PR on Github, you’ll see the testing job running on the actions tab. When you merge or push code to the main branch, you will see 2 jobs: testing and publish job (for publishing, you need to change your package.json version manually).
I think it’s great to see that configuration without any effort.
Automatic Library exportable to npm
Your library is usable (folder src/lib) using an import like this: import { AwesomeThing } from '@company/your-library'
Automatic binary CLI
Your library, of course, is usable using npx @company/your-library
. Your users will have access to your functionalities so fast!
Setup unit testing without any extra dependencies
Testing in Node.js, or in general JavaScript, is totally broken for me. Jest, Mocha, any new flavors, it’s a terrible thing (yes Jest, forgive me, you know how I love you). In Node.js 20, we finally have native testing (test runner Node.js 20 LTS).
So, that’s it! I hope you enjoy and check it out for yourself.
This content originally appeared on DEV Community and was authored by Jairo Fernández