-
-
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
Provide instructions on publishing GH Pages #162
Conversation
@@ -32,16 +32,26 @@ webpack(config).run(function(err, stats) { | |||
var openCommand = process.platform === 'win32' ? 'start' : 'open'; | |||
var homepagePath = require(path.resolve(relative, 'package.json')).homepage; |
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.
I think we have a path issue here - it is looking for package.json in my user directory. Maybe something like path.resolve(__dirname, relative, '..', 'package.json')
?
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.
Can you send a PR? I already merged the other one.
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.
Yep will do!
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.
This is weird though, relative
should be correct here.
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.
Never mind, I'll fix it in this PR.
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.
Sounds good - thanks!
Paths should be fixed now, opened #163 to investigate why e2e didn't fail. (If you'd like, take a look please.) |
Sounds good, will check it out |
thx for fixing this. |
Within a week. |
Not sure it is required to The subtree command only pushes the build folder to the branch even if it doesn't exist. Otherwise, awesome work! |
I had errors using |
Oh interesting. Thanks for clearing that up! |
This is great, but if you add a router it doesn't work because GitHub Pages doesn't natively support single page apps with frontend routing (unless it's the ugly hashtag kind). It might be good for the docs to mention this. There is a simple workaround for this by adding a |
That’s the tradeoff, yes. PRs to docs are super welcome.
OMG, that’s such a cool approach. We should definitely link to that. |
Actually I think we should detect if your |
Just made a PR to add a note about the router to the template readme (love the "contribute some" link, made it super easy). I think there would need to be some sort of flag, like |
Let’s stick with just the doc notice then for now. |
Okay, sounds good. |
@domenic has also written a gist explaining how to deploy automatically using Travis (seems to have some problem, so please see its comments) Also this might be useful: |
This continues #94 and integrates it into the tool more tightly.
By default, you see this after
npm run build
:However, if you specify
homepage
inpackage.json
, you will see something like this instead:Maybe we can even detect the host in the future by URL and offer other sequences of commands without necessarily embedding them into the tool. The user can always copy and paste them into a custom script, if they want to. This way it’s super easy to keep deploy customizable without adding flags to the tool.