-
Notifications
You must be signed in to change notification settings - Fork 6.8k
chore(dev-app): prevent multiple reloads per file change #1762
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
Conversation
R: @hansl |
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.
1 nit on typing. Good work!
@@ -187,7 +187,7 @@ export function vendorTask() { | |||
|
|||
|
|||
/** Create a task that serves the dist folder. */ | |||
export function serverTask(liveReload = true, | |||
export function serverTask(liveReload: boolean | { enable: boolean, filter: Function } = true, |
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.
Function
=> (filename: string, callback: (boolean) => void)
311d2bd
to
f7d400b
Compare
Updated @hansl. |
export type livereloadOptions = boolean | { | ||
enable: boolean, | ||
filter: (filename: string, callback: (isAllowed: boolean) => void) => void; | ||
} |
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.
Semicolon.
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.
Are you referring to the comma after enable
or adding a semicolon after the export? If it's the latter, none of the other exports use a semicolon.
export function serverTask(liveReload = true, | ||
streamCallback: (stream: NodeJS.ReadWriteStream) => void = null) { | ||
export function serverTask(liveReload: livereloadOptions = true, | ||
streamCallback: (stream: NodeJS.ReadWriteStream) => void = null) { |
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.
Left align with liveReload
above.
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.
Prevents the local dev app from reloading 5-6 times whenever a file changes. Adds a filter that only watches for the bundle (which also contains all of the CSS and HTML), theme changes and changes to the demo apps. Fixes angular#1681.
f7d400b
to
5227bc3
Compare
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.
LGTM
Prevents the local dev app from reloading 5-6 times whenever a file changes. Adds a filter that only watches for the bundle (which also contains all of the CSS and HTML), theme changes and changes to the demo apps. Fixes angular#1681.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Prevents the local dev app from reloading 5-6 times whenever a file changes. Adds a filter that only watches for the bundle (which also contains all of the CSS and HTML), theme changes and changes to the demo apps.
Fixes #1681.