Since this is a template repository, you can use that green Use this template button to start a new repository from this template.
Do not forget to remove
CHANGELOG.mdfile and update thechange__herevalues in several files. You can also remove this README file.
Clone the repository:
git clone --depth 1 git@github.com:alioguzhan/typescript-library-template.gitInstall the deps:
yarn installIf you want to change or remove some parts of this template, do it before start development.
Once you feel ready, remove the .git folder and start a new one:
rm -rf .git && git initYou can check if there are any outdated package with npm-check-updates tool. Do not forget to remove
CHANGELOG.mdfile and update thechange__herevalues in several files. You can also remove this README file.
NOTE: There are a couple of places that you need to change before start. Open
package.jsonfile replace anychange__herewith your values.
Write your library code to index.ts file and run:
yarn startThis will watch your changes and reloads the server.
This setup expects you to follow conventional-commits format. There is a husky command runs before every commit for validation.
To learn more about conventional commits see its website.
You can remove that section from package.json also remove the related packages:
yarn remove -D husky @commitlint/cliRun:
yarn buildThis will create your compiled files under ./dist folder.
Jest is configured and ready to use. Just run:
yarn testThis template uses TypeDoc by default.
Run yarn make:docs and a folder named docs will be created in your root directory. Just open index.html in your browser to see if your like it or not.