Skip to content

Commit 2b6ca02

Browse files
committed
Move index.html to root folder
1 parent 0e070c4 commit 2b6ca02

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed

src/index.html index.html

File renamed without changes.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"bin",
1414
"scripts",
1515
"src",
16+
"index.html",
1617
"webpack.config.dev.js",
1718
"webpack.config.prod.js"
1819
],

scripts/init.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ module.exports = function(hostPath, appName, verbose) {
3535
JSON.stringify(hostPackage, null, 2)
3636
);
3737

38-
// Move the src folder
38+
// Move the files for the user
3939
// TODO: copying might be more correct?
4040
fs.renameSync(path.join(selfPath, 'src'), path.join(hostPath, 'src'));
41+
fs.renameSync(path.join(selfPath, 'index.html'), path.join(hostPath, 'index.html'));
4142

4243
// Run another npm install for react and react-dom
4344
// TODO: having to do two npm installs is bad, can we avoid it?

webpack.config.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ module.exports = {
7676
// TODO: infer from package.json?
7777
new HtmlWebpackPlugin({
7878
inject: true,
79-
template: path.resolve(__dirname, relative, 'src/index.html'),
79+
template: path.resolve(__dirname, relative, 'index.html'),
8080
}),
8181
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"development"' })
8282
]

webpack.config.prod.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ module.exports = {
7676
// TODO: infer from package.json?
7777
new HtmlWebpackPlugin({
7878
inject: true,
79-
template: path.resolve(__dirname, relative, 'src/index.html'),
79+
template: path.resolve(__dirname, relative, 'index.html'),
8080
}),
8181
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }),
8282
new webpack.optimize.OccurrenceOrderPlugin(),

0 commit comments

Comments
 (0)