diff --git a/src/index.html b/index.html similarity index 100% rename from src/index.html rename to index.html diff --git a/package.json b/package.json index e26e622d09d2f1e92bdfb096e71865b5a6c7f046..b8287a09321319bfdf823eaad55cbb86f0ac3c82 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "bin", "scripts", "src", + "index.html", "webpack.config.dev.js", "webpack.config.prod.js" ], diff --git a/scripts/init.js b/scripts/init.js index 15e86a5e56f854a81ba4dbe1871d39bf18f5268a..e9c12ecc6b01d56788d34e2840e7a94a6d3da9f8 100644 --- a/scripts/init.js +++ b/scripts/init.js @@ -35,9 +35,10 @@ module.exports = function(hostPath, appName, verbose) { JSON.stringify(hostPackage, null, 2) ); - // Move the src folder + // Move the files for the user // TODO: copying might be more correct? fs.renameSync(path.join(selfPath, 'src'), path.join(hostPath, 'src')); + fs.renameSync(path.join(selfPath, 'index.html'), path.join(hostPath, 'index.html')); // Run another npm install for react and react-dom // TODO: having to do two npm installs is bad, can we avoid it? diff --git a/webpack.config.dev.js b/webpack.config.dev.js index e208ce8e7bc40293c601d25e8e50e5f3fcf9aad8..164597cfe1d07a87e21ba46f1a8167c721653da9 100644 --- a/webpack.config.dev.js +++ b/webpack.config.dev.js @@ -76,7 +76,7 @@ module.exports = { // TODO: infer from package.json? new HtmlWebpackPlugin({ inject: true, - template: path.resolve(__dirname, relative, 'src/index.html'), + template: path.resolve(__dirname, relative, 'index.html'), }), new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"development"' }) ] diff --git a/webpack.config.prod.js b/webpack.config.prod.js index fbc8f71992452816f1324879b0ea84b4bf5f048c..92d04159779a04938318d53a4613242addb4cb42 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -76,7 +76,7 @@ module.exports = { // TODO: infer from package.json? new HtmlWebpackPlugin({ inject: true, - template: path.resolve(__dirname, relative, 'src/index.html'), + template: path.resolve(__dirname, relative, 'index.html'), }), new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }), new webpack.optimize.OccurrenceOrderPlugin(),