-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't assume the project is hosted at the root #94
Changes from 4 commits
0081f76
17ced6b
24c9c9b
e2dc775
d16a092
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,6 @@ webpack(config).run(function(err, stats) { | |
|
||
var openCommand = process.platform === 'win32' ? 'start' : 'open'; | ||
console.log('Successfully generated a bundle in the build folder!'); | ||
console.log(); | ||
console.log('You can now serve it with any static server, for example:'); | ||
console.log(' cd build'); | ||
console.log(' npm install -g http-server'); | ||
console.log(' hs'); | ||
console.log(' ' + openCommand + ' http://localhost:8080'); | ||
console.log(); | ||
console.log('You can now deploy and serve it from <homepage>.'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should keep the previous message for the simple case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just pushed an update for that - will work on instructions for publishing to GH Pages. |
||
console.log('The bundle is optimized and ready to be deployed to production.'); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "my-app", | ||
"version": "0.0.1", | ||
"private": true, | ||
"devDependencies": { | ||
"react-scripts": "0.1.0" | ||
}, | ||
"dependencies": { | ||
"react": "^15.2.1", | ||
"react-dom": "^15.2.1" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"eject": "react-scripts eject" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it’s best to infer just the path portion? e.g.
stuff.com/wow
should give us just/wow
.What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, agreed - good call. Putting together a regex that could do it, but do you think there is a more elegant way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url.parse()
gives you an object withpathname
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right. Thanks for bearing with me. Added that, so we should now always have the path portion of the url defined in
homepage
, or/
if it isn't defined.