Merge branch 'master' into version-updates

This commit is contained in:
Simon Bailey 2014-09-01 08:35:02 +01:00
commit 652ea1f97c
6 changed files with 14 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "generator-react-webpack", "name": "generator-react-webpack",
"version": "0.0.9", "version": "0.0.10",
"description": "Yeoman generator for ReactJS and Webpack", "description": "Yeoman generator for ReactJS and Webpack",
"keywords": [ "keywords": [
"yeoman-generator", "yeoman-generator",

View File

@ -29,7 +29,7 @@ module.exports = function (grunt) {
options: { options: {
port: 8000, port: 8000,
webpack: webpackDevConfig, webpack: webpackDevConfig,
publicPath: '/scripts/', publicPath: '/assets/',
contentBase: './<%= pkg.src %>/', contentBase: './<%= pkg.src %>/',
}, },

View File

@ -14,6 +14,6 @@
<div id="content"> <div id="content">
<h1>If you can see this, something is broken (or JS is not enabled)!!.</h1> <h1>If you can see this, something is broken (or JS is not enabled)!!.</h1>
</div> </div>
<script type="text/javascript" src="scripts/main.js"></script> <script type="text/javascript" src="assets/main.js"></script>
</body> </body>
</html> </html>

View File

@ -9,7 +9,8 @@
module.exports = { module.exports = {
output: { output: {
filename: 'main.js' filename: 'main.js',
publicPath: '/assets/'
}, },
cache: true, cache: true,

View File

@ -10,8 +10,8 @@ var webpack = require('webpack');
module.exports = { module.exports = {
output: { output: {
publicPatch: 'dist/', publicPath: '/assets/',
path: 'dist/scripts/', path: 'dist/assets/',
filename: 'main.js' filename: 'main.js'
}, },
@ -31,6 +31,10 @@ module.exports = {
new webpack.optimize.AggressiveMergingPlugin() new webpack.optimize.AggressiveMergingPlugin()
], ],
resolve: {
extensions: ['','.js','.jsx']
},
module: { module: {
preLoaders: [{ preLoaders: [{
test: '\\.js$', test: '\\.js$',

View File

@ -14,7 +14,7 @@ var ReactTransitionGroup = React.addons.TransitionGroup;
require('../../styles/reset.css'); require('../../styles/reset.css');
require('../../styles/main.css'); require('../../styles/main.css');
var imageURL = '../../images/yeoman.png'; var imageURL = require('../../images/yeoman.png');
var <%= scriptAppName %> = React.createClass({ var <%= scriptAppName %> = React.createClass({
render: function() { render: function() {