Commit f9fe9ff9 authored by Max's avatar Max Committed by Christopher Chedeau
Browse files

Move index.html to root folder

parent 6cc901b9
Showing with 5 additions and 3 deletions
+5 -3
File moved
......@@ -13,6 +13,7 @@
"bin",
"scripts",
"src",
"index.html",
"webpack.config.dev.js",
"webpack.config.prod.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?
......
......@@ -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"' })
]
......
......@@ -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(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment