Skip to content
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

Improved documentation for reload* values #1906

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions packages/browser-sync/lib/default-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,28 +411,38 @@ module.exports = {
scrollElementMapping: [],

/**
* Time, in milliseconds, to wait before
* instructing the browser to reload/inject following a
* file change event
* Time, in milliseconds, to wait before instructing the browser to
* reload/inject following a file change event. This allows time for
* any other processing that may need to occur after the initial event.
* Unlike `reloadDebounce` this does not _prevent_ a reload from
* occurring, it just offsets the reload time from the event.
* @property reloadDelay
* @type Number
* @default 0
*/
reloadDelay: 0,

/**
* Wait for a specified window of event-silence before
* sending any reload events.
* Time, in milliseconds, to wait since the most recent change event
* before sending any reload events. If this value is set too high and
* changes occur slowly over a long period of item, this may delay
* browser reload for a long time but can minimize the total number of
* reloads triggered.
* @property reloadDebounce
* @type Number
* @default 0
* @default 500
* @since 2.6.0
*/
reloadDebounce: 500,

/**
* Emit only the first event during sequential time windows
* of a specified duration.
* Time, in milliseconds, to wait after processing a change event before
* processing the next one. If this is set to 0, all events will be
* processed as soon as they occur (taking into account the `relayDelay`
* and `relayDebounce` values). If there are many change events around
* the same time, setting this to a non-zero value will cause them to be
* processed one at a time with a delay and (potentially) a browser reload
* each time.
* @property reloadThrottle
* @type Number
* @default 0
Expand Down