├── .gitignore ├── README.md ├── USAGE.txt ├── index.html ├── index.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | browser-bundle.js 3 | browser-bundle.min.js 4 | npm-debug.log 5 | *~ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-browserify-template 2 | 3 | ![unmaintained](http://img.shields.io/badge/status-unmaintained-red.png) 4 | 5 | ## Getting started: 6 | 7 | * `git clone https://github.com/petehunt/react-browserify-template.git myapp` 8 | * `cd myapp` 9 | * `npm install` 10 | * `npm start` (will watch files for changes) 11 | * Then open `index.html` in your browser. Edit `index.js` to make changes. 12 | -------------------------------------------------------------------------------- /USAGE.txt: -------------------------------------------------------------------------------- 1 | Run `npm start` from this directory to watch the filesystem for changes and build `browser-bundle.js`. 2 | If you want to build a minified version do `npm run build` to build `browser-bundle.min.js` with optimizations enabled. 3 | Edit `index.js` to get started and open `index.html` to see your app in action. 4 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | React Browserify template 4 | 5 | 6 | If you see this then something is wrong. 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** @jsx React.DOM */ 2 | var React = require('react'); 3 | var pkg = require('./package.json'); 4 | 5 | React.renderComponent(

{pkg.name}, brought to you by React!

, document.body); 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-browserify-template", 3 | "version": "0.0.1", 4 | "description": "Quick boilerplate for browserify and React modules.", 5 | "main": "index.js", 6 | "dependencies": { 7 | "react": "~0.8" 8 | }, 9 | "devDependencies": { 10 | "browserify": "~2.36.0", 11 | "envify": "~0.2.0", 12 | "reactify": "~0.4.0", 13 | "statics": "~0.1.0", 14 | "uglifyjs": "~2.3.6", 15 | "watchify": "~0.4.1" 16 | }, 17 | "scripts": { 18 | "start": "STATIC_ROOT=./static watchify -o browser-bundle.js -v -d .", 19 | "build": "STATIC_ROOT=./static NODE_ENV=production browserify . | uglifyjs -cm > browser-bundle.min.js", 20 | "collect-static": "collect-static . ./static", 21 | "test": "echo \"Error: no test specified\" && exit 1" 22 | }, 23 | "author": "Pete Hunt", 24 | "license": "Apache 2", 25 | "browserify": { 26 | "transform": [ 27 | "reactify", 28 | "envify" 29 | ] 30 | } 31 | } 32 | --------------------------------------------------------------------------------