0.0.8 • Published 4 years ago
@danielfsousa/cli v0.0.8
monorepo-typescript-lib-starter
Starter kit for monorepo libraries in Typescript.
If you are building a small library and don't want a monorepo checkout: danielfsousa/typescript-lib-starter
Usage
Click on the Use this template
button on github or clone the repository and remove the .git
folder:
git clone https://github.com/danielfsousa/monorepo-typescript-lib-starter --depth 1
cd monorepo-typescript-lib-starter
rm -rf .git
Features
- lerna for managing a monorepo
- RollupJS for multiple optimized bundles with tree shaking for UMD (browsers), CommonJS (Node.js) and ES Modules (module bundlers)
- Automatic types (*.d.ts) file generation
- Tests and coverage report generation using Jest
- ESlint with standard style for linting typescript and javascript files
- Prettier for code formatting
- Automatic documentation generation with TypeDoc and deployment to Github Pages
- Pre-commit hooks with husky and lint-staged for linting, code formatting, unit tests and commit message validation
- Codecov for consuming coverage reports
- Automatic releases and changelog, using lerna and Commitizen(https://conventionalcommits.org/en/v1.0.0/)
- CI/CD with Github Actions
- Pre-created examples for a CLI app and an isomorphic core library that runs on browsers, Node.js and Deno
Scripts
Execute the scripts from the root directory to run for all packages or inside a package folder to run only for that project.
npm run bootstrap
Syslink packages and binariesnpm run clean
Remove generated code, typings and cachesnpm run commit
Commit using conventional commit stylenpm run docs
Generate and open documentationnpm run format
Format code using prettiernpm run format:check
Check if code is following the prettier stylenpm run lint
Lints codenpm run lint:fix
Lints and tries to fix linting errorsnpm run publish
Bump packages versions based on the commits messages, edit the CHANGELOG file and publish a new release to npm and githubnpm run test
Run test suite and generate coverage reportnpm run test:watch
Run test suite in interactive watch modenpm run watch
Run build script in watch mode
Git hooks
pre-commit
: Lints, check your code style and runs associated unit tests for every staged filecommit-msg
: Check if your commit message follows the Conventional Commits specification before every commit (you can runnpm run commit
to help you create a good commit message)