Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
f9fe9ff9
Commit
f9fe9ff9
authored
8 years ago
by
Max
Committed by
Christopher Chedeau
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Move index.html to root folder
parent
6cc901b9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
index.html
+0
-0
index.html
package.json
+1
-0
package.json
scripts/init.js
+2
-1
scripts/init.js
webpack.config.dev.js
+1
-1
webpack.config.dev.js
webpack.config.prod.js
+1
-1
webpack.config.prod.js
with
5 additions
and
3 deletions
+5
-3
src/
index.html
→
index.html
+
0
-
0
View file @
f9fe9ff9
File moved
This diff is collapsed.
Click to expand it.
package.json
+
1
-
0
View file @
f9fe9ff9
...
...
@@ -13,6 +13,7 @@
"bin"
,
"scripts"
,
"src"
,
"index.html"
,
"webpack.config.dev.js"
,
"webpack.config.prod.js"
],
...
...
This diff is collapsed.
Click to expand it.
scripts/init.js
+
2
-
1
View file @
f9fe9ff9
...
...
@@ -35,9 +35,10 @@ module.exports = function(hostPath, appName, verbose) {
JSON
.
stringify
(
hostPackage
,
null
,
2
)
);
// Move the
src fold
er
// Move the
files for the us
er
// 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?
...
...
This diff is collapsed.
Click to expand it.
webpack.config.dev.js
+
1
-
1
View file @
f9fe9ff9
...
...
@@ -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"
'
})
]
...
...
This diff is collapsed.
Click to expand it.
webpack.config.prod.js
+
1
-
1
View file @
f9fe9ff9
...
...
@@ -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
(),
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment