├── .gitignore
├── README.md
├── app
├── assets
│ └── index.html
├── components
│ └── App.jsx
├── initialize.js
└── styles
│ └── application.css
├── brunch-config.js
└── package.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # Numerous always-ignore extensions
2 | *.diff
3 | *.err
4 | *.orig
5 | *.log
6 | *.rej
7 | *.swo
8 | *.swp
9 | *.vi
10 | *~
11 | *.sass-cache
12 |
13 | # OS or Editor folders
14 | .DS_Store
15 | .cache
16 | .project
17 | .settings
18 | .tmproj
19 | nbproject
20 | Thumbs.db
21 |
22 | # NPM packages folder.
23 | node_modules/
24 |
25 | # Brunch output folder.
26 | public/
27 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Brunch + React + Babel/ES6
2 |
3 | This is a modern JS skeleton with React for [Brunch](http://brunch.io).
4 |
5 | ## Installation
6 |
7 | Clone this repo manually or use `brunch new dir -s brunch/with-react`
8 |
9 | ## Getting started
10 |
11 | * Install (if you don't have them):
12 | * [Node.js](http://nodejs.org): `brew install node` on OS X
13 | * [Brunch](http://brunch.io): `npm install -g brunch`
14 | * Brunch plugins and app dependencies: `npm install`
15 | * Run:
16 | * `npm start` — watches the project with continuous rebuild. This will also launch HTTP server with [pushState](https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history).
17 | * `npm run build` — builds minified project for production
18 | * Learn:
19 | * `public/` dir is fully auto-generated and served by HTTP server. Write your code in `app/` dir.
20 | * Place static files you want to be copied from `app/assets/` to `public/`.
21 | * [Brunch site](http://brunch.io), [Getting started guide](https://github.com/brunch/brunch-guide#readme)
22 |
--------------------------------------------------------------------------------
/app/assets/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Brunch
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |

14 |
Bon Appétit.
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/components/App.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default class App extends React.Component {
4 | render() {
5 | return (
6 |
9 | );
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/app/initialize.js:
--------------------------------------------------------------------------------
1 | import ReactDOM from 'react-dom';
2 | import React from 'react';
3 | import App from 'components/App';
4 |
5 | document.addEventListener('DOMContentLoaded', () => {
6 | ReactDOM.render(, document.querySelector('#app'));
7 | });
8 |
--------------------------------------------------------------------------------
/app/styles/application.css:
--------------------------------------------------------------------------------
1 | .brunch {
2 | font-family: -apple-system, Sans-Serif;
3 | text-align: center;
4 | font-size: 24pt;
5 | color: #3f894a;
6 | }
7 |
8 | a {
9 | color: #3f894a;
10 | text-decoration: none;
11 | border-bottom: 1px solid rgba(0, 0, 0, 0);
12 | }
13 |
14 | a:hover {
15 | color: #27552e;
16 | }
17 |
18 | h5 > a {
19 | text-decoration: underline;
20 | }
21 |
--------------------------------------------------------------------------------
/brunch-config.js:
--------------------------------------------------------------------------------
1 | // See http://brunch.io for documentation.
2 | exports.files = {
3 | javascripts: {
4 | joinTo: {
5 | 'vendor.js': /^(?!app)/,
6 | 'app.js': /^app/
7 | }
8 | },
9 | stylesheets: {joinTo: 'app.css'}
10 | };
11 |
12 | exports.plugins = {
13 | babel: {presets: ['latest', 'react']}
14 | };
15 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "brunch-app",
3 | "description": "Brunch.io application",
4 | "private": true,
5 | "author": "Brunch",
6 | "version": "0.0.1",
7 | "repository": "",
8 | "scripts": {
9 | "start": "brunch watch --server",
10 | "build": "brunch build --production"
11 | },
12 | "dependencies": {
13 | "react": "^15.4",
14 | "react-dom": "^15.4"
15 | },
16 | "devDependencies": {
17 | "auto-reload-brunch": "^2",
18 | "babel-brunch": "~6.0",
19 | "babel-preset-latest": "^6",
20 | "babel-preset-react": "~6.22",
21 | "brunch": "^2",
22 | "clean-css-brunch": "^2",
23 | "uglify-js-brunch": "^2"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------