https://github.com/deepraining/react-ts-lib-starter
一个用于快速创建 React 组件库的模板脚手架,使用 Typescript 与 Storybook 构建. A boilerplate for creating a React library, using Typescript and Storybook.
https://github.com/deepraining/react-ts-lib-starter
boilerplate enzyme gulp jest lib library react starter storybook typescript webpack
Last synced: 3 months ago
JSON representation
一个用于快速创建 React 组件库的模板脚手架,使用 Typescript 与 Storybook 构建. A boilerplate for creating a React library, using Typescript and Storybook.
- Host: GitHub
- URL: https://github.com/deepraining/react-ts-lib-starter
- Owner: deepraining
- License: mit
- Created: 2019-03-08T03:25:11.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-30T02:16:15.000Z (almost 6 years ago)
- Last Synced: 2025-01-15T14:35:58.997Z (4 months ago)
- Topics: boilerplate, enzyme, gulp, jest, lib, library, react, starter, storybook, typescript, webpack
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.en.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# react-ts-lib-starter
[中文文档](./README.md)
A boilerplate for creating a React library, using Typescript and Storybook.
## Getting started
```
git clone https://github.com/senntyou/react-ts-lib-starter.git --depth=1cd react-ts-lib-starter
npm install # install dependencies
npm run storybook # develop using storybook
npm run build # build distribution files
```## Features
- [less](http://lesscss.org/), [scss](https://sass-lang.com/) style languages support.
- [TypeScript](http://www.typescriptlang.org/) language, [jest](https://jestjs.io/en/) + [enzyme](https://github.com/airbnb/enzyme) test support.
- Using [storybook](https://storybook.js.org/) to develop, preview, deploy static site.## Project
```
- src
- index.{ts,tsx} # ts entry file
- styles
- index.{less,scss} # style entry file- .storybook # for storybook
- stories # for storybook
```By default, styles use `less` language, if you want to use `scss` language, you should modify `package.json` by:
```
"scripts": {
- "build:styles": "npm run build:less",
+ "build:styles": "npm run build:scss",
}
```