Skip to content

A simple boilerplate for Babel, React, EJS, Webpack, and SASS

License

Notifications You must be signed in to change notification settings

jereddanielson/brews

Repository files navigation

BREWS

A simple, somewhate opinionate boilerplate for Babel, React, EJS, Webpack, and SASS.

What's in it?

  • Babel (transpiles ES2015 and JSX syntax into compatible JS)
  • React (flexible and efficient DOM rendering with shades of MVC)
  • EJS (JavaScript templating for HTML (here used to render pages at build rather than runtime))
  • Webpack (all-in-wonder module bundler, task runner, and build tool)
  • SASS (better than CSS in every way)

Also included are files for an app entry point and React root App component - basically index.ejs, index.jsx, index.scss, and App.jsx.

package.json already includes the necessary dependencies, and Webpack is preconfigured for development and production. This eliminates two of the major pain points when starting a new React project (installying npm dependencies and configuring Webpack). Webpack-dev-server and react-hot-loader recompile only parts of the app that have changed and facilitate rapid development iterations without having to reload the page (most of the time.)

To run

  • You'll need to have git and node installed in your system.

Clone the project:

> $ git clone https://github.com/jereddanielson/brews.git

Then install the dependencies:

> $ npm install

Commands

For development mode (which will start webpack-dev-server and react-hot-reloader on localhost:3000):

> $ npm run dev

For production mode including clean directory, NODE_ENV flag, and minification:

> $ npm run build

To clean the public directory without running webpack:

> $ npm run clean

Inspired by Ali Al Dallal's react-webpack-babel boilerplate.

About

A simple boilerplate for Babel, React, EJS, Webpack, and SASS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published