Creates an instance of do watch.
full YASSB configuration object.
full YASSB configuration object.
Determines if it's the first time we are running the watcher.
Determines that we are in watch mode.
Inits do watch by first calling a full build process, and then initiating the watch function. We first do a non-watched build process to ensure everything is running smoothly. In a future update we could start directly with the watcher.
Sends a message to the browser via the WebSocket connection to reload the page at the end of the build process.
Sends to the browser via the WebSocket connection the message the the rebuild process has started.
Determines if the changed file is of a given type to determine if we need to rebuild certain assets.
extension that we are looking for.
the file that has changed.
true if the file that has changed has the extension that we are looking for.
Determins if the file changes is a script and if scripts should run.
the file that has changed.
true if the file changed is a script.
Determins if the file changes is a stylesheet and if styles should run.
the file that has changed.
true if the file changed is a stylesheet.
Determines if it is unnecessary to rebuild text files
whether we need to run scripts.
whether we need to run styles.
true if it's not the first run and we are rebuilding either scripts or styles.
Watchs the src
folder as defined in the config object and runs the builder on changes.
Actually listens to any change in the project folder and respawns the build process onchanges. To speed up things excludes from the build provess assets that do not need to be changed.