@2snail/create-lib 中文文档教程
Create Lib
创建单个 ts 库,使用 jest 进行测试,然后使用 npm 发布。
Usage
- Create
mkdir <libName>
cd <libName>
npm create @2snail/lib
-- or --
yarn create @2snail/lib
- Install
npm i
-- or --
yarn install
- Test
npm test
npm run test:watch
-- or --
yarn test
yarn test:watch
- Build
npm run build
-- or --
yarn build
- Publish
npm run publish
-- or --
yarn publish
Create Lib
Create single ts lib, test with jest, and publish with npm.
Usage
- Create
mkdir <libName>
cd <libName>
npm create @2snail/lib
-- or --
yarn create @2snail/lib
- Install
npm i
-- or --
yarn install
- Test
npm test
npm run test:watch
-- or --
yarn test
yarn test:watch
- Build
npm run build
-- or --
yarn build
- Publish
npm run publish
-- or --
yarn publish