This is a client-side React boilerplate that can be built and pushed to a CDN or to any static hosting solution like Surge, S3 et cetera.
If you don't want to serve your static files on a managed solution and want full control of your front-end infrastructure, check react-spa-clientside instead.
- React/Redux/Redux-Saga for UI.
- Glamor as a CSS-in-JS solution.
- Pug for generating static HTML.
- Jest & Enzyme for simple unit testing, without mocks.
- Prerequisites:
node
andyarn
Clone the repo:
git clone https://github.com/ShippableBoilerplates/react-spa-clientside-cdn
rm -rf .git && git init
Install dependencies:
yarn install
Run in development mode via webpack-dev-server
yarn dev
webpack-dev-server
will be serving on: localhost:3000
To build assets in production mode:
yarn build/prod
To serve the static assets locally and test things:
yarn serve
The compiled assets will be in the public folder. You can upload them to a CDN and you're done.
- Run
yarn lint
for linting with auto fixing: - Run
yarn test
for testing. - Run
yarn cleanup
to manually remove built assets.