-
-
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
Update instructions on publishing to GitHub pages #841
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
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.
Thanks @Janpot! I just tested this and it works great.
I just had a few comments about the text in teh readme. Could you fix those? I think this is ready to be merged after that.
git push -f origin gh-pages | ||
git checkout - | ||
``` | ||
To publish it at http://myname.github.io/myapp, run: |
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.
The homepage
field in package.json instructions a few lines above uses http://myusername.github.io/my-app
as an example, let's use the same URL here.
Then run: | ||
|
||
npm run deploy | ||
``` |
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 we only put the script and deployment command inside a code block? Now it looks a bit weird.
I mean like this (also changed the URL to http://myusername.github.io/my-app here):
To publish it at http://myusername.github.io/my-app, run:
npm install --save-dev gh-pagesAdd the following script in your package.json:
// ... "scripts": { // ... "deploy": "gh-pages -d build" }
Then run:
npm run deploy
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.
👍 Done
I just found out that I found out that adding the |
👍 |
Thank you @Janpot! |
@gaearon There's also an |
But using that option would mean all the old builds are kept in the gh-pages branch, since they have a unique filename? I think adding the file in |
@fson Correct. Been skimming a bit more through their code and it seems their CLI has an option |
Can you post a final screenshot of what gets printed? |
@Janpot yeah, looks like that's what the I don't have a strong opinion on which way to use. I guess difference is that |
Btw do we know for sure that this module works on windows? |
Not sure whether it works on windows, I'm on a macbook. Looking at the amount of downloads in combination with the lack of any issues containing "windows" I'm assuming it does. |
Looks great. Thanks! |
@fson Please tag with milestone before merging so we don't miss it in release notes |
…react-app # By Dan Abramov (2) and others # Via Dan Abramov * 'master' of https://github.com/facebookincubator/create-react-app: Correct a comment mistype in webpack production config (facebook#855) load setupTests file at setupTestFramework stage (facebook#846) Spell check (facebook#845) Tweak readme Update instructions on publishing to GitHub pages (facebook#841) Make webpackHotDevClient support webpack 2 too (facebook#840) Tweak eject output Promote "React must be in scope" to be an error (facebook#822) Fix script name to open chrome (facebook#831)
* Update instructions on publishing to GitHub pages * Update README formatting
…react-app # By Dan Abramov (2) and others # Via Dan Abramov * 'master' of https://github.com/facebookincubator/create-react-app: Correct a comment mistype in webpack production config (facebook#855) load setupTests file at setupTestFramework stage (facebook#846) Spell check (facebook#845) Tweak readme Update instructions on publishing to GitHub pages (facebook#841) Make webpackHotDevClient support webpack 2 too (facebook#840) Tweak eject output Promote "React must be in scope" to be an error (facebook#822) Fix script name to open chrome (facebook#831)
fixes #501 #654