-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Add LiveReload #663
Merged
JoelMarcey
merged 13 commits into
facebook:master
from
amyrlam:amy/add-livereload-final
May 17, 2018
Merged
Add LiveReload #663
Changes from 9 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a6b1020
Add LiveReload
amyrlam 7ff7b27
Only run LiveReload in development
amyrlam e9ecf52
Prettify file
amyrlam 8127dfd
Add catch for NODE_ENV being undefined
amyrlam b63db94
Add LiveReload docs update
amyrlam 2c264e8
Simplify process.env call
amyrlam 11bf350
Tweak code a little
yangshun e703dde
Fix LiveReload path
amyrlam 7c5bb0d
Forgot to change the LiveReload port back
yangshun 04f627d
Fix gaze
amyrlam 37142b8
Merge branch 'master' into amy/add-livereload-final
amyrlam 8f6377f
Update package-lock.json with required entities for Live Reload
JoelMarcey 5584173
Merge branch 'master' into amy/add-livereload-final
JoelMarcey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* Copyright (c) 2017-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
module.exports = { | ||
LIVE_RELOAD_PORT: 35729, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
On second thought, maybe this approach is flawed re: https://stackoverflow.com/a/21835063/2628398. If some file was in root of website it wouldn't be watched.
Off to sleep, will revisit this tomorrow...
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.
One last thing, it's confusing that
**/*.*
doesn't work...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.
.*
specifies any extension and is redundant because*
would do the same (in most cases).Correct.
*/*.*
only looks at the files directlywebsite/<dir>
, files which are deeper such aspages/en/index.js
would not be watched.**/*.*
works for me.I think
**/*
is the safest and is what we need. What's the rationale for changing to*/*.*
?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.
Sorry for the confusion!
With the
./**/*
syntax there LiveReload doesn't start up. It seems to be because of the starting.
. It hangs like the gif at the end.Delete the
.*
syntax locally and everything is fine:So now how to fix watching all of
website/
? Locally, change to**/*.*
. It also doesn't work.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.
Even delete docs (which is wrong) and just
[ '**/*', // website ],
doesn't run, like the gif?Something else I'm missing? 🤔
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.
That's super odd. Is working fine for me. Could you reinstall the dependencies or at worst, fetch a clean copy of the repository?
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.
Change it back to
**/*
for now. I'm pretty confident that's the right path to specify.