1.3.1 • Published 10 years ago
generator-react-zero v1.3.1
generator-react-zero
A Yeoman generator to bootstrap a React/Flux application.
Features
- React/Flux project scaffold
- Sub-generator for react components
- Test setup (with tape)
- Sass scaffold with Bourbon
- Complete build process with npm
- JS Build
- JS bundling (using Browserify)
- External sourcemaps
- ES6 + JSX transpiling (using Babel)
- CSS build
- SASS transpiling
- Assets copy
- copy all assets to
public/
- copy all assets to
- Serve in browser
- Watch all & sync browser
- JS Build
Getting Started
Install yeoman and the react-zero generator:
$ npm install -g yo
$ npm install -g generator-react-zeroRun the app generator:
$ mkdir myapp && cd myapp
$ yo react-zeroRun the component sub-generator (inside the project's directory):
$ yo react-zero:componentUsage
The entire build process is based on NPM.
Build, watch & serve
$ npm startBuild project
$ npm run buildBuild project in public/.
You can also build the different part separately:
$ npm run build:js
$ npm run build:css
$ npm run build:assetsWatch project
Same as build, but replace build with watch
Serve project
$ npm run serveBrowser sync the public/ folder.
Clean
$ npm run cleanRemove content of public/ folder.
Run tests
Run all tests:
$ npm testOr run separated tests:
$ npm test -- test/components/MyComponent-test.jsFuture improvements
- Assets optimization (minify, uglify, etc).
Resources
- Why I use tape instead of mocha & so should you
- Unit testing react components without a dom
- Gulp is awesome, but do we really need it
License
MIT
Contributing
- Fork it ( https://github.com/nsarno/generator-react-zero/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request