Skip to content

Commit f9fe9ff

Browse files
mxstbrvjeux
authored andcommitted
Move index.html to root folder
1 parent 6cc901b commit f9fe9ff

File tree

5 files changed

+5
-3
lines changed

5 files changed

+5
-3
lines changed
File renamed without changes.

package.json

Lines changed: 1 addition & 0 deletions
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)