mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-09-11 12:10:36 +08:00
Squashed commit of the following:
commit 25ef9a176ee9bab902579f79415bd6047a77a62f
Author: Simon Bailey <simon@newtriks.com>
Date: Thu May 15 19:51:45 2014 +0100
Updated README
Signed-off-by: Simon Bailey <simon@newtriks.com>
commit 1b0020c8fd248bc0dc892bed1f3e315867378274
Merge: d8fd494 c468b98
Author: Edd <accounts@edd.fm>
Date: Sat Apr 26 11:13:52 2014 +0100
Merged with Master
commit d8fd494478cb7fd0d97a47a90986f4c1b29eb996
Author: Edd <accounts@edd.fm>
Date: Thu Apr 24 22:09:19 2014 +0100
Trimming redundant options from Gruntfile
commit b5015ae42b0beb770ae1b146f152b5f38764987e
Author: Edd <accounts@edd.fm>
Date: Sun Mar 30 21:32:14 2014 +0100
Moved development mode to webpack-dev-server to imrove rebuild times
commit 7d31ade8085a8d415b95c67dba69ae5157ebf9b4
Author: Edd <accounts@edd.fm>
Date: Wed Feb 26 00:18:56 2014 +0000
Changed JSX filenames to .jsx over .js
commit 00faa6182b6cb4ae46b05dd12db1e73da4b47953
Author: Edd <accounts@edd.fm>
Date: Mon Feb 24 23:39:18 2014 +0000
Updated engines & Travis build targets
commit e58e0d70639f3c3e9acc7d085b6a795365a140a6
Author: Edd <accounts@edd.fm>
Date: Mon Feb 24 23:26:04 2014 +0000
Added auto generation of a template CSS file for a component
commit f6c67351aead570224b2457261d457a1954277dc
Author: Edd <accounts@edd.fm>
Date: Mon Feb 24 00:06:42 2014 +0000
Updated default app test
commit 996d769685d1a4f20ae2c4117422790bbc347594
Author: Edd <accounts@edd.fm>
Date: Sun Feb 23 23:32:37 2014 +0000
Added test for default main component (currently identical to any other component tests)
commit 31dfcbaff6ee9aef339886897e053a339f98021b
Author: Edd <accounts@edd.fm>
Date: Sun Feb 23 22:54:04 2014 +0000
Moved webpack configuration to a separate file
- Added webpack config file
- Added Uglify to webpack config
- Added source maps in webpack config
Moved entry file back in to Gruntfile
commit 6b3a3e92b80f3121e1128e4f166cf36aa32cfa26
Author: Edd <accounts@edd.fm>
Date: Sun Feb 23 17:23:07 2014 +0000
Added distribution folder & Grunt tasks to deal with it
- Created Distribution build folder (script link broken)
- Added grunt-contrib-copy
- Added grunt-uglify
- Bumped React version number
- Switched source map types
Signed-off-by: Simon Bailey <simon@newtriks.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# generator-react-webpack [](https://travis-ci.org/newtriks/generator-react-webpack) [](http://gruntjs.com/)
|
||||
# generator-react-webpack [](https://travis-ci.org/eddhannay/generator-react-webpack) [](http://gruntjs.com/)
|
||||
|
||||
> Yeoman generator for [ReactJS](http://facebook.github.io/react/) - lets you quickly set up a project including karma test runner and [Webpack](http://webpack.github.io/) module system.
|
||||
|
||||
@@ -54,7 +54,7 @@ Example:
|
||||
yo react-webpack:component foo
|
||||
```
|
||||
|
||||
Produces `src/scripts/components/Foo.js` (*javascript - JSX*):
|
||||
Produces `src/scripts/components/Foo.jsx` (*javascript - JSX*):
|
||||
```
|
||||
/**
|
||||
* @jsx React.DOM
|
||||
@@ -98,6 +98,14 @@ describe('Foo', function () {
|
||||
});
|
||||
```
|
||||
|
||||
And `src/styles/Foo.css`:
|
||||
```
|
||||
|
||||
.Foo{
|
||||
border: 1px dashed #f00;
|
||||
}
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Running `grunt test` will run the unit tests with karma. Tests are written using [Jasmine](http://pivotal.github.io/jasmine/) by default.
|
||||
@@ -148,7 +156,7 @@ Each component is a module and can be required using the [Webpack](http://webpac
|
||||
Out the box the [Gruntfile](http://gruntjs.com/api/grunt.file) is configured with the following:
|
||||
|
||||
1. **webpack**: uses the [grunt-webpack](https://github.com/webpack/grunt-webpack) plugin to load all required modules and output to a single JS file `src/scripts/main.js`. This is included in the `src/index.html` file by default and will reload in the browser as and when it is recompiled.
|
||||
2. **watch**: uses the [grunt-watch](https://github.com/gruntjs/grunt-contrib-watch) plugin and watches for file changes. Livereload support is included by default and thus on file change the *webpack* task is run and the browser will auto update.
|
||||
2. **webpack-dev-server**: uses the [webpack-dev-server](https://github.com/webpack/webpack-dev-server) to watch for file changes and also serve the webpack app in development.
|
||||
3. **connect**: uses the [grunt-connect](https://github.com/gruntjs/grunt-contrib-connect) plugin to start a webserver at [localhost](http://localhost:8000).
|
||||
4. **karma**: uses the [grunt-karma](https://github.com/karma-runner/grunt-karma) plugin to load the Karma configuration file `karma.conf.js` located in the project root. This will run all tests using [PhantomJS](http://phantomjs.org/) by default but supports many other browsers.
|
||||
|
||||
@@ -167,7 +175,3 @@ Contributions are welcomed. When submitting a bugfix, write a test that exposes
|
||||
## License
|
||||
|
||||
[BSD license](http://opensource.org/licenses/bsd-license.php)
|
||||
|
||||
|
||||
[](https://bitdeli.com/free "Bitdeli Badge")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user