# React Static Boilerplate
[](https://www.npmjs.com/package/generator-react-static)
[](https://www.npmjs.com/package/generator-react-static)
[](https://travis-ci.org/koistya/react-static-boilerplate)
[](https://david-dm.org/koistya/react-static-boilerplate#info=devDependencies)
> A static website starter kit powered by [React.js](http://facebook.github.io/react/)
> and [Webpack](http://webpack.github.io/).
Visit [demo site](http://react-static.tarkus.me) |
See [roadmap](https://waffle.io/koistya/react-static-boilerplate) |
Join [#react-static-boilerplate](https://gitter.im/koistya/react-static-boilerplate) chatroom on Gitter to stay up to date.
### Features
✓ Generates static `.html` pages from [React](http://facebook.github.io/react/) components
✓ Generates routes based on the list of files in the `/pages` folder
✓ Next generation JavaScript with [Babel](https://github.com/babel/babel)
✓ [Sass](http://sass-lang.com/) syntax for CSS via [postCSS](https://github.com/postcss/postcss) and [precss](https://github.com/jonathantneal/precss)
✓ Development web server with [React Hot Loader](http://gaearon.github.io/react-hot-loader/) and [BrowserSync](http://www.browsersync.io)
✓ Bundling and optimization with [Webpack](http://webpack.github.io/)
✓ [Code-splitting](https://github.com/webpack/docs/wiki/code-splitting) and async chunk loading
✓ Easy deployment to [GitHub Pages](https://pages.github.com/), [Amazon S3](http://davidwalsh.name/hosting-website-amazon-s3) or [Firebase](https://www.firebase.com/)
✓ [Yeoman](http://yeoman.io/) generator ([generator-react-static](https://www.npmjs.com/package/generator-react-static))
### Directory Layout
```
.
├── /build/ # The folder for compiled output
├── /node_modules/ # 3rd-party libraries and utilities
├── /components/ # React components
├── /lib/ # Libraries and utilities
├── /pages/ # React.js-based web pages
│ ├── /blog/ # Blog post entries example
│ ├── /404.js # Not Found page
│ ├── /500.js # Error page
│ ├── /about.js # About Us page
│ └── /index.js # Home page
├── /static/ # Static files such as favicon.ico etc.
├── /test/ # Unit and integration tests
├── /tools/ # Build automation scripts and utilities
│── app.js # The main JavaScript file (entry point)
│── config.js # Website configuration / settings
│── LICENSE.txt # License file
│── package.json # Dev dependencies and NPM scripts
└── README.md # Project overview
```
### Getting Started
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/koistya/react-static-boilerplate.git MyApp
$ cd MyApp
$ npm install
$ npm start
```
Then open [http://localhost:3000/](http://localhost:3000/) in your browser.
### How to Test
The unit tests are powered by [chai](http://chaijs.com/) and [mocha](http://mochajs.org/).
```
$ npm test
```
### How to Deploy
```shell
$ npm run deploy # Deploys the project to GitHub Pages
```
### How to Update
You can always fetch and merge the recent changes from this repo back into
your own project:
```shell
$ git checkout master
$ git fetch react-static-boilerplate
$ git merge react-static-boilerplate/master
$ npm install
```
### Related Projects
* [React Starter Kit](https://github.com/kriasoft/react-starter-kit)
* [React Routing](https://github.com/kriasoft/react-routing)
* [React Decorators](https://github.com/kriasoft/react-decorators)
### Learn More
* [Getting Started with React.js](http://facebook.github.io/react/)
* [Getting Started with GraphQL and Relay](https://quip.com/oLxzA1gTsJsE)
* [React.js Questions on StackOverflow](http://stackoverflow.com/questions/tagged/reactjs)
* [React.js Discussion Board](https://discuss.reactjs.org/)
* [Learn ES6](https://babeljs.io/docs/learn-es6/), [ES6 Features](https://github.com/lukehoban/es6features#readme)
---
Made with ♥ by Konstantin Tarkus ([@koistya](https://twitter.com/koistya)) and [contributors](https://github.com/koistya/react-static-boilerplate/graphs/contributors) | MIT License