UNPKG

@25sprout/react-starter

Version:

25sprout web starter with React

58 lines (34 loc) 2.25 kB
React Starter ===== [![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) *新芽網路前端開發架構* ## 簡介 提供 command line tool 快速建立 react 專案,專案內容主要在 template 資料夾底下。 ## 如何開始 有兩種方法可以安裝 command line tool 1. `npm install -g git+ssh://git@fox.25sprout.com:frontend/react-starter.git` 2. `yarn global add ssh://git@fox.25sprout.com/frontend/react-starter.git` 如果你要安裝特定的版本(例如 `0.1.1` )可以下 1. `npm install -g git+ssh://git@fox.25sprout.com:frontend/react-starter.git#v0.1.1` 2. `yarn global add ssh://git@fox.25sprout.com/frontend/react-starter.git#0.1.1` > 如果想要體驗 webpack 2 可以使用以下指令安裝 > `yarn global add ssh://git@fox.25sprout.com/frontend/react-starter.git#webpack-2` > > 但目前 storybook 尚未支援 webpack 2 開發 #### 踏出第一步 安裝完之後就可以使用 `react-starter` 指令 - `react-starter -h`: 看目前指令支援哪些參數 - `react-starter -V`: 目前指令版本 - `react-starter -n react-new-project`: 產生一個 `react-new-project` 專案,裡面內建 `react-starter` 環境 - `react-starter -n react-new-library -s`: 產生一個 `react-new-library` 專案,給簡單的 component demo 或是製作 react library 使用。 ## Contribution 此專案 commit message 使用 angular format ,並使用 [commitizen](http://commitizen.github.io/cz-cli/) 輔助產生 commit message - 加入修改的檔案 `git add .` - 產生 commit message `npm run commit` ## Release 此專案使用 [standard-version](https://github.com/conventional-changelog/standard-version) 輔助 release 流程,自動產生 `CHANGELOG.md` 和 提升版本號(提升 major version 依據是否有 `feat` 來判斷) - `npm run release` 可以自己決定 提升 patch, minor or major - `npm run release -- --release-as minor` **Warning**: 第一次 release 請下 - `npm run release -- --first-release`