Skip to content

ekeric13/react-fatigue-dev

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Fatigue Dev

Module of modules and Makefile to reduce the amount of boilerplate when developing React components.

Installation

$ npm install ekeric13/react-fatigue-dev

Usage

Add this module as a dev dependency, and add the following to your project's Makefile:

include node_modules/react-fatigue-dev/Makefile

You'll now have a number of targets available, see make help for details. You may customize the default behaviour by overriding the Makefile variables, view ./Makefile to see the defaults.

For example use port :8000 instead of :3000, and instead of serving ./example, serve ./test:

SERVER_FLAGS = -p 8000 ./test
include node_modules/react-fatigue-dev/Makefile

Check out react-click-outside or react-star-ratings for a full example.

Includes

  • fatigue
  • babel-cli
  • babel-preset-es2015
  • babel-preset-react
  • babel-preset-stage-0
  • babelify
  • browserify
  • browserify-hmr
  • ecstatic
  • react
  • react-dom
  • watchify
  • other crazy shit, wtf

.babelrc

Example babelrc:

{
  "presets": ["es2015", "react", "stage-0"],
  "plugins": [],
  "env": {
    "development": {
      "plugins": [
        ["react-transform", {
          "transforms": [{
            "transform": "react-transform-hmr",
            "imports": ["react"],
            "locals": ["module"]
          }]
        }],
        "transform-runtime",
        "transform-decorators-legacy"
      ]
    }
  }
}

Links

Badges


tjholowaychuk.com  ·  GitHub @tj  ·  Twitter @tjholowaychuk

About

Module of modules for making modules

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 100.0%