This is a Prismic + React + Flux starter kit with webpack. It uses Sass variables/mixins, and includes Bourbon Neat.
- Compilation with webpack
- React and jsx
- Babel ES6 compilation
- ESLint
- Stylesheets can be CSS, SASS, or mixed
- Development
- Development Express server
- Hot Module Replacement (LiveReload for Stylesheets and React components enabled)
- SourceMaps
- Production
- Production Express server
- Uglify javascript
- Webpack loader to automatically npm install and save dependencies.
These instructions will get you a copy of Prismic React Starter Kit up and running on your local machine.
This kit follows the Airbnb JavaScript Style Guide, enforced with ESLint. airbnb/javascript is a tool that enforces the best syntax rules for the best coding practices ever, that frees us from messing up with writing our custom rules. Cool! This is good for avoiding common errors while writing code, speeding up the debugging process and maintaining at the same time the best readability of the code, enforcing code style rules, especially when we work in teams. You'll need to:
npm install -g eslint
Use package control to install SublimeLinter and SublimeLinter-contrib-eslint
$ git clone [email protected]:smilovic/clever-react.git && cd prismic-react
Install all dependencies
npm install
Builds the application and starts a webserver with livereload. By default the webserver starts at port 3030. You can define a port in the .env file.
npm run server:dev
SublimeLinter will lint inline for you automatically, but to run a lint test with webpack simply run:
npm run lint
To deploy, you must build and run the server. The server runs with pm2. You'll want to make sure pm2 is installed globally on the server.
npm run build && npm run server:prod
See also the tutorial from which this Starter Kit was adapted