1 | # React Starter
|
2 |
|
3 | [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/) [![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg?style=flat-square)](https://github.com/conventional-changelog/standard-version)
|
4 |
|
5 | _新芽網路前端開發架構_
|
6 |
|
7 | ## 簡介
|
8 |
|
9 | 提供 command line tool 快速建立 react 專案,專案內容主要在 template 資料夾底下。
|
10 |
|
11 | ## 如何開始
|
12 |
|
13 | Starter 有上 [npm](https://www.npmjs.com/package/@25sprout/react-starter) ,因此有兩種方法可以安裝 command line tool
|
14 |
|
15 | 1. `npm install -g @25sprout/react-starter`
|
16 | 2. `yarn global add @25sprout/react-starter`
|
17 |
|
18 | #### 踏出第一步
|
19 |
|
20 | 安裝完之後就可以使用 `react-starter` 指令
|
21 |
|
22 | - `react-starter -h`: 看目前指令支援哪些參數
|
23 | - `react-starter -V`: 目前指令版本
|
24 | - `react-starter -n react-project`: 產生一個 `react-new-project` 專案,裡面內建 `react-starter` 環境
|
25 | - `react-starter -n react-typescript-project -t`: 產生一個 `react-typescript-project` 專案,裡面內建 `typescript` 的 `react-starter` 環境
|
26 |
|
27 | ## Contribution
|
28 |
|
29 | 此專案 commit message 使用 angular format ,並使用 [commitizen](http://commitizen.github.io/cz-cli/) 輔助產生 commit message
|
30 |
|
31 | - 加入修改的檔案 `git add .`
|
32 | - 產生 commit message `npm run commit`
|
33 |
|
34 | ## Release
|
35 |
|
36 | 此專案使用 [standard-version](https://github.com/conventional-changelog/standard-version) 輔助 release 流程,自動產生 `CHANGELOG.md` 和 提升版本號(提升 major version 依據是否有 `feat` 來判斷)
|
37 |
|
38 | - `npm run release`
|
39 |
|
40 | 可以自己決定 提升 patch, minor or major
|
41 |
|
42 | - `npm run release -- --release-as minor`
|
43 |
|
44 | **Warning**: 第一次 release 請下
|
45 |
|
46 | - `npm run release -- --first-release`
|