Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.

Adding browserSync for JavaScript file changes #92

Closed
wants to merge 2 commits into from
Closed

Adding browserSync for JavaScript file changes #92

wants to merge 2 commits into from

Conversation

alex-page
Copy link

Addresses #82

Summary of changes:
Updated the gulp file so that the user can make changes to JS without having to recompile.

bmuenzenmeyer and others added 2 commits November 5, 2016 22:10
@geoffp
Copy link
Contributor

geoffp commented Feb 1, 2017

Hey, @alex-page -- thanks for the fix! I've taken the gist of this and rolled it into my in-progress branch, aysnc-building and merged it with the new file watcher structure.

Does BrowserSync inject JS or do something special when you say: browserSync.reload('*.js')? If so, do you trust it?

@alex-page
Copy link
Author

alex-page commented Feb 20, 2017

@geoffp From my understanding and usage of browserSync it doesn't do anything special or inject anything new when adding an additional watch parameter for JavaScript. There is the initial injection for the watching script, which from my understanding just waits for a change to any of the specified paths and files.

That additional line of code is saying:

  • Please watch JavaScript files
  • If the files change go through your normal process of reloading the page

This allows themer's to easily add small javascript snippets to the patterns which extend functionality without having to reload the page on every change. This is useful for creating an accordion or a dropdown menu pattern.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants