Code Monkey home page Code Monkey logo

react-flux-gulp-starter's Introduction

Isomorphic React-Flux-Gulp Boilerplate

We don't always choose isomorphic React/Flux/Gulp, but when we do, we clone this.

Build tools

Demo

https://react-flux-gulp-starter-test.herokuapp.com/

Getting Started (The Docker Version ๐Ÿณ)

  1. Make sure Homebrew is installed
  2. Install and/or update VirtualBox
  3. Install Kitematic
  4. Install docker-osx-dev
  5. 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.

1. Install gulp globally:

$ npm install --global gulp

2. Install project dependencies:

$ npm install

3. Run gulp

Start a local dev environment:

$ gulp

Generate a production build:

$ gulp production

4. Deploy to Heroku

4.1. Setup

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###
4.2. Deploy

Just push it. That is all.

$ git push heroku master

Troubleshooting & Gotchas

Docker Issues

alt meltdown

Docker keeps telling me ERROR: mkdir [...] no space left on device

Run the cleanup script:

./_scripts/docker-cleanup.sh

Docker won't run, and it's affecting my self-esteem.

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.

react-flux-gulp-starter's People

Contributors

bribeiro avatar claus avatar rynocouse avatar sambernard avatar stevescavo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.