-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tools: Setup BrowserSync to reload page when files change.
- Loading branch information
Showing
5 changed files
with
19,819 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// See http://www.browsersync.io/docs/options/ | ||
|
||
const paths = { | ||
theme: 'source/wp-content/themes/wporg-news-2021', | ||
globalHeaderFooter: 'source/wp-content/mu-plugins/wporg-mu-plugins/mu-plugins/blocks/global-header-footer' | ||
}; | ||
|
||
// Any file of these types in any subdirectory | ||
const watchedFilesPattern = '/**/*.(php|js|html|css|svg|png)'; | ||
|
||
module.exports = { | ||
/* | ||
* This is disabled so that BrowserSync can run on any URL, which is needed to support multiple development | ||
* environments. | ||
*/ | ||
'snippet': false, | ||
|
||
// Avoid conflicts with other running tasks. | ||
// Can't be auto-detected because has to match injected port in `0-sandbox.php`. | ||
'port': 3008, | ||
|
||
"files": [ | ||
paths.theme + '/theme.json', | ||
paths.theme + watchedFilesPattern, | ||
paths.globalHeaderFooter + watchedFilesPattern | ||
], | ||
|
||
"ignore": [ | ||
paths.theme + '/sass/**/*.*', | ||
paths.globalHeaderFooter + '/postcss/**/*.*' | ||
], | ||
|
||
"open": false, | ||
"reloadOnRestart": true, | ||
"notify": false, | ||
}; |
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
Oops, something went wrong.