Ryan Sobol's React skeleton for Brunch
Install the Brunch package globally with NPM.
npm install -g brunch
Create a new React application based on this Brunch skeleton and install its dependencies.
brunch new path/to/app --skeleton ryansobol/with-react
The application's code lives in the app
directory.
la app
Static files are placed in the app/assets
directory and are copied to the public
directory on build.
la app/assets
React components are placed in the app/components
directory and are combined into the public/app.js
file on build.
NOTE: Each React component lives in a module so can be shared with other modules using ES6 module syntax.
la app/components
CSS stylesheets are placed in the app/styles
directory and are combined into the public/app.css
file on build.
la app/styles
On each build, the application's files are saved to the public
directory and served by the HTTP server.
la public
Watch the project for changes and launch an HTTP server.
NOTE: Press Ctrl + C
to quit.
npm start
In a new Terminal tab, navigate back the the project directory.
cd path/to/app
Take a look at the public
directory to see what Brunch created.
la public
Open the application in your default browser.
open http://localhost:8000/