A scaffolding for building your TypeScript library.
# install cli
mnpm install -g @hfe/tsm-cli
# generate your typescript project
tsm init [you-project-name]
cd [your-project-name]
# install dependencies use yarn(or `npm install`)
yarn
# check version
tsm --version
-
npm t
: Run test suite -
npm start
: Runnpm run build
in watch mode -
npm run test:watch
: Run test suite in interactive watch mode -
npm run test:prod
: Run linting and generate coverage -
npm run build
: Generate bundles and typings, create docs -
npm run lint
: Lints code -
npm run commit
: Commit using conventional commit style (husky will tell you to use it if you haven't 😉) -
(m)npm publish
: Publish new npm packages(in meituan).
- Zero-setup. After running
npm install
things will setup for you 😉 - RollupJS for multiple optimized bundles following the standard convention and Tree-shaking
- Tests, coverage and interactive watch mode using Jest
- Prettier and TSLint for code formatting and consistency
-
Docs automatic generation and deployment to
gh-pages
, using TypeDoc - Automatic types
(*.d.ts)
file generation - Travis integration and Coveralls report
- (Optional) Automatic releases and changelog, using Semantic release, Commitizen, Conventional changelog and Husky (for the git hooks)