Create a new JS lib with no build configuration.
Just run a npx @andersonsmed/create-js-lib@latest
command in your terminal and answer the prompted questions.
After that, this script will create a new lib with all the configs so you can focus only on implementing the code.
If something doesn’t work, please file an issue
If you have questions or need help, please ask in GitHub Discussions.
The nearly created lib will have everything you need to build and publish it, including:
- ES6 and CommonJS support, so you can choose which one to follow while writing your code.
- Babel as transpiler, so you don't have to care about making your lib compatible with older versions of JS.
- Webpack as bundler, so you can publish the minified version of your lib.
- Husky for managing and installing git hooks.
- ESLint and Prettier to enable static code validation and enforce code style.
- A build script to prepare your code to be published.
- A development script to enable you to test your lib locally.
All of the configuration files contains only the essentials for your lib to be published, so you can extend them easily to fit your own needs.
Create JS lib depends on some external commands and might fail if they are not accessible from the terminal.
Following is a list with all the external dependencies with guides on how to install each one of them:
- GIT
- NPM (if you choose to install packages using npm)
- YARN (if you choose to install packages using yarn)
Create JS lib is open source software licensed as MIT.