generator-react-zero

1.3.1 • Public • Published

generator-react-zero

npm version Build Status

A Yeoman generator to bootstrap a React/Flux application.

Features

  • [x] React/Flux project scaffold
  • [x] Sub-generator for react components
  • [x] Test setup (with tape)
  • [x] Sass scaffold with Bourbon
  • [x] 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/
    • Serve in browser
    • Watch all & sync browser

Getting Started

Install yeoman and the react-zero generator:

$ npm install -g yo
$ npm install -g generator-react-zero

Run the app generator:

$ mkdir myapp && cd myapp
$ yo react-zero

Run the component sub-generator (inside the project's directory):

$ yo react-zero:component

Usage

The entire build process is based on NPM.

Build, watch & serve

$ npm start

Build project

$ npm run build

Build project in public/.

You can also build the different part separately:

$ npm run build:js
$ npm run build:css
$ npm run build:assets

Watch project

Same as build, but replace build with watch

Serve project

$ npm run serve

Browser sync the public/ folder.

Clean

$ npm run clean

Remove content of public/ folder.

Run tests

Run all tests:

$ npm test

Or run separated tests:

$ npm test -- test/components/MyComponent-test.js

Future improvements

  • Assets optimization (minify, uglify, etc).

Resources

License

MIT

Contributing

  1. Fork it ( https://github.com/nsarno/generator-react-zero/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Package Sidebar

Install

npm i generator-react-zero

Weekly Downloads

0

Version

1.3.1

License

MIT

Last publish

Collaborators

  • nsarno