Yeoman generator that scaffolds out a ReactJS web app. Based on yeoman/generator-webapp.
- CSS Autoprefixing (new)
- Built-in preview server with LiveReload
- Awesome Image Optimization (via OptiPNG, pngquant, jpegtran and gifsicle)
- Mocha Unit Testing with Karma
- Bootstrap 3 CSS framework
- Dependency manager - Browserify
For more information on what generator-reactjs
can do for you, take a look at the Grunt tasks used in package.json
.
- Install:
npm install -g generator-reactjs
- Run:
yo reactjs
- Run
grunt build
for building andgrunt serve
for preview
- Run
grunt karma
in a separate window for tests
Test are written in coffescript because they look better.
You can use JSX in coffescript by adding
`
Not exactly stable but if you keep them in the current format it should work.(globals in tests do not work with this)
- Run:
yo reactjs:component {name}
to create a component with that name and simple test case for it. This works for 'path/to/name'
-
--skip-install
Skips the automatic execution of
bower
andnpm
after scaffolding has finished.
Submit a pull request and I'll see what I can do. Thanks!