An open API service indexing awesome lists of open source software.

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.

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=1

cd 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",
}
```