/typescript-library-starter

零配置的基础工具包,用于在TypeScript中构建库,集成 RollupJS, Prettier, Babel 7, ESLint, and more!

Primary LanguageTypeScriptMIT LicenseMIT

TypeScript library starter

A starter project that makes creating a TypeScript library extremely easy.

Usage (用法)

git clone https://github.com/alexjoverm/typescript-library-starter.git YOURFOLDERNAME
cd YOURFOLDERNAME

# Run npm install and write your library name when asked. That's all!
npm install

Features (特性)

  • 以后再说

Importing library (导入库)

You can import the generated bundle to use the whole library generated by this starter:

import myLib from 'mylib'

Additionally, you can import the transpiled modules from dist/lib in case you have a modular library:

import something from 'mylib/dist/lib/something'

NPM scripts (NPM 脚本)

  • npm run build: Generate bundles and typingsnt`: Lints code
  • npm run commit: Commit using conventional commit style (husky will tell you to use it if you haven't 😉)