react webpack es6 skeleton
If you're confused by all the different tutorials out there for react, this is a good starting point for a boilerplate react, webpack, and es6 setup. This is meant to be easy, so if it's not, let me know. This also includes bootstrap for quick development.
If you want to get the demo running locally, follow these steps:
git clone firstname.lastname@example.org:phouse512/react-es6-skeleton.git
npm install- this may take a minute or two
npm run build- when you first start, you need to bundle the js the first time
npm start- run the small express server that serves up
Some notes on how the project is setup:
- the main
app.jsis the express server that serves up the
index.htmlin the root directory.
- static assets are stored inside the
publicdirectory, including the final
bundle.jsfile produced by webpack.
- express is configured to load assets from
public, so once you put your css or images in there, you can reference their web paths as
static/<your file path in public herewhen you need it in
- if you want to change where webpack puts
bundle.js, just change the
- for an example of how to import local modules in your es6 code, look at the
- if you want to dig further,
react-routeris included with a basic rendering of the
Homecomponent, but it's not necessary to understand for now