We don't always choose isomorphic React/Flux/Gulp, but when we do, we clone this.
- gulp
- sass
- babel
- browserify
- browser-sync
- etc, see package.json
https://react-flux-gulp-starter-test.herokuapp.com/
- Make sure Homebrew is installed
- Install and/or update VirtualBox
- Install Kitematic
- Install docker-osx-dev
- Run
./dev.sh
The project should now be viewable at http://default:3000. You can adjust default Browsersync settings at http://default:3002.
Of course, if you don't want to run Docker, you can also run it locally.
$ npm install --global gulp
$ npm install
Start a local dev environment:
$ gulp
Generate a production build:
$ gulp production
You only need to do this once.
We assume that you have an app set up at Heroku. Below, please substitute all occurences of ###HEROKU_APP_NAME###
with your actual Heroku app name.
First, install the Heroku Toolbelt and log in to Heroku:
$ heroku login
By default, Heroku does not install modules specified in your package.json's devDependencies
section, but it needs those to build your site. You tell Heroku to install dev dependencies by setting the config variable NPM_CONFIG_PRODUCTION
to false
:
$ heroku config:set NPM_CONFIG_PRODUCTION=false --app ###HEROKU_APP_NAME###
Finally, add your Heroku app's repo as a remote. Run this in the project's root directory:
$ heroku git:remote --app ###HEROKU_APP_NAME###
Just push it. That is all.
$ git push heroku master
Run the cleanup script:
./_scripts/docker-cleanup.sh
This is typically related to a dependency (or sub-dependency) conflict during npm install
. Sometimes shutting down your currently running default
vm and re-running ./dev.sh
will help. If that doesn't work, you can get the knife out ๐ช:
rm -rf .docker/.npm_revision && rm -rf .docker/node_modules.tar.gz
Then re-run ./dev.sh
.