✓ Modern JavaScript syntax (ES2015+) via Babel
✓ Modern CSS/SCSS syntax (CSS3+) via PostCSS
✓ Application state management via Redux
✓ Routing and navigation via React Router, React Router Redux, History
✓ Modular styles via CSS Modules
✓ Code-splitting and async chunk loading
✓ Hot Module Replacement (HMR) /w React Hot Loader
✓ Bundling and optimization with Webpack
✓ Cross-device testing with Browsersync
✓ IE8 Support (Need to build after)
.
├── /build/ # The folder for compiled output
├── /node_modules/ # 3rd-party libraries and utilities
├── /src/
├── /components/ # Shared/generic UI components
│ ├── /Layout/ # Layout component
│ ├── /Button/ # Button component
│ └── /... # etc.
├── /containers/ # containers
├── /routes/ # View/screen UI components + routing information
│ ├── /About/ # About page
│ ├── /NotFound/ # Error page
│ ├── /Home/ # Home page
│ └── /... # etc.
├── /static/ # Static files such as favicon.ico etc.
├── /store/ # redux store
├── /test/ # Unit and integration tests
├── /tools/ # Build automation scripts and utilities
│── LICENSE.txt # Licensing information
│── package.json # The list of project dependencies and NPM scripts
└── README.md # Project overview / getting started guide
Just clone the repo, install Node.js modules and run npm start
:
$ git clone -o react-static-boilerplate -b master --single-branch \
https://github.com/jun0205/react-static-boilerplate.git MyApp
$ cd MyApp
$ npm install # Install project dependencies listed in package.json
$ npm start # Build and launch the app, same as "node tools/start.js"
NODE: Make sure that you have Node.js v6 installed on your local machine.
react <= 0.14.9
react-dom <= 0.14.9
react-router <= 2.3.0
webpack = 1.15.0
The unit tests are powered by chai and mocha.
$ npm test
React Router history guides.
production web applications should use browserHistory for the cleaner URLs.
$ npm run build # Build production release
You can always fetch and merge the recent changes from this repo back into your own project:
$ git checkout master
$ git fetch react-static-boilerplate
$ git merge react-static-boilerplate/master
$ npm install
- React Starter Kit — Isomorphic web app boilerplate (Node.js, React, GraphQL, Webpack, CSS Modules)
- Babel Starter Kit — JavaScript library boilerplate (ES2015, Babel, Rollup, Mocha, Chai, Sinon, Rewire)
- React Redux Starter Kit — Get started with React, Redux, and React-Router!
- Redux — Redux is a predictable state container for JavaScript apps.
- React Router — Declarative routing for React
- React Router Redux — Ruthlessly simple bindings to keep react-router and redux in sync
- History — HTML5 History API wrapper library
- Getting Started with React.js
- Getting Started with GraphQL and Relay
- React.js Questions on StackOverflow
- React.js Discussion Board
- Learn ES6, ES6 Features
This source code is licensed under the MIT license found in the LICENSE.txt file.