UNPKG

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