a boilerplate for React-Babel-Webpack project
This repo is a boilerplate for React-Babel-Webpack project. You could use it as a base to build your own web app.
pre-commitused to lint and test your code
commit-msgused to lint your commit message
First, clone the repo.
$ git clone https://github.com/ruanyf/react-babel-webpack-boilerplate.git $ cd
masterbranch only supports Webpack 1. If you want to use Webpack 2, please switch to
webpack2branch 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
.githistory 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.jsonand modify fields like
licenseand so on to fit your project.
From there, you start to develop your own code in the
appdirectory. When you finish coding, use
npm run buildor
npm run deployto 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 commitinstead of
git commit, the command will help you to produce a formatted commit message.