Skip to content

mjohnston/generator-react-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Yeoman generator

This generator creates a skeleton React project that uses webpack to bundle client-side JavaScript files. The webpack config is set up to require React from the node_modules directory.

In addition, the LESS loader is enabled so that you can do the following from JavaScript:

require('./app.less');

Getting Started

Installing

First, make sure you have yeoman installed.

$ npm install -g yo

Install the React app generator globally.

$ npm install -g generator-react-app

Finally, initiate the generator:

$ yo react-app my-app

Component generator

There is also a component generator that will scaffold the resources necessary for a typical React component.

$ yo react-app:component foo-bar

This will create:

  • src/components/foo-bar.js
  • src/components/foo-bar.less

Running the App

$ npm start

This will start a server on port 9000. The port number can be overriden with process.env.PORT.

A watch task will also be triggered, watching any source files inside src. Live Reload is also enabled by default. A connect server will be generated at index.js, and the client-side code is generated in the src directory.

License

MIT

About

Yeoman generator for creating a React app with webpack.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published