react-babel-webpack-boilerplate

a boilerplate for React-Babel-Webpack project

  • 所有者: ruanyf/react-babel-webpack-boilerplate
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

This repo is a boilerplate for React-Babel-Webpack project. You could use it as a base to build your own web app.

Features

  • Equip with React, ES6 & Babel 6
  • Lint with ESlint and Airbnb's style sheet.
  • Build with Webpack(support Webpack 1 & Webpack 2)
  • Support hot module replacement
  • Auto Open a new browser tab when Webpack loads, and reload the page when you modified the code
  • Use Commitizen to produce commit message according to AngularJS convention
  • Support git hook pre-commit used to lint and test your code
  • Support git hook commit-msg used to lint your commit message
  • Use conventional-changelog to generate CHANGELOG.md

How to use

First, clone the repo.

$ git clone https://github.com/ruanyf/react-babel-webpack-boilerplate.git <yourAppName>
$ cd <yourAppName>

Important: master branch only supports Webpack 1. If you want to use Webpack 2, please switch to webpack2 branch which will be the default branch in the near future.

# only run the command when you want to use Webpack 2
$ git checkout webpack2

Second, delete the old .git history and initialize new history.

$ rm -rf .git
$ git init

Third, install the dependencies.

$ npm install

Then, launch the boilerplate app.

$ npm start

Now you should see a new browser window/tab opening and a title of "Hello World" in http://127.0.0.1:8080.

Last, You need update package.json and modify fields like name, version, description, keywords, author, license and so on to fit your project.

From there, you start to develop your own code in the app directory. When you finish coding, use npm run build or npm run deploy to build the static files.

Attention, when committing your code, you should use AngularJS's commit message convention. Otherwise, the repo will throw an error. If you use npm run commit instead of git commit, the command will help you to produce a formatted commit message.

License

MIT

主要指標

概覽
名稱與所有者ruanyf/react-babel-webpack-boilerplate
主編程語言JavaScript
編程語言JavaScript (語言數: 3)
平台
許可證
所有者活动
創建於2015-11-26 09:28:27
推送於2018-05-08 05:21:01
最后一次提交2017-06-13 17:04:00
發布數7
最新版本名稱v1.4.1 (發布於 2017-01-07 14:34:48)
第一版名稱v1.2.0 (發布於 2016-04-21 08:10:43)
用户参与
星數1.1k
關注者數43
派生數290
提交數70
已啟用問題?
問題數31
打開的問題數0
拉請求數13
打開的拉請求數0
關閉的拉請求數8
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?