babel-react-rollup-starter
Version:
A simple boilerplate for web apps with React, Babel, and Rollup.
59 lines (35 loc) • 1.72 kB
Markdown
# babel-react-rollup-starter [](https://travis-ci.org/yamafaktory/babel-react-rollup-starter) [](https://www.npmjs.com/package/babel-react-rollup-starter) [](http://standardjs.com/)
> A simple boilerplate for web apps with [React](https://facebook.github.io/react/), [Babel](http://babeljs.io/), and [Rollup](http://rollupjs.org/).
## Installation
Via **npm** into a fresh project:
```sh
npm i babel-react-rollup-starter
```
Or using Git:
```sh
git clone https://github.com/yamafaktory/babel-react-rollup-starter.git
cd babel-react-rollup-starter
npm i
```
For a faster installation, use [yarn](https://yarnpkg.com/en/) instead of npm.
## Usage
### Development
Running the following command will open your default browser to `html/index-dev.html`. Thanks to [Browsersync](https://www.browsersync.io/), any modifications inside `src` trigger a browser refresh:
```sh
npm start
```
To generate a development bundle:
```sh
npm run build:dev
```
### Production
1. First run the following command:
```sh
npm run build
```
2. Open `html/index.html` in your browser.
The Rollup production configuration file changes `NODE_ENV` to production and minifies the code with [UglifyJS](http://lisperator.net/uglifyjs/).
## Linting
The code quality is checked by the [JavaScript Standard Style](http://standardjs.com/).
## License
Released under the [MIT license](https://opensource.org/licenses/MIT) by Davy Duperron.