For a long time did not make gulp, all quickly forget, today to review the next Browser-sync automatic refresh plug-in, the installation of the following prompt:
$ npm Install browser-sync--save-dev<br>> [email protected] Install/usr/local/lib/node_modules/browser-sync /node_modules/socket.io/node_modules/engine.io/node_modules/ws> (Node-gyp rebuild 2> builderror.log) | | (Exit 0)
When this tip comes up, you'll find that the code is not moving, and you might think that the code has stopped running (I thought so). However, this is just a hint, continue to wait on it, if the final installation failure can be tried a few more times.
Today when the Browser-sync, found that the file can not automatically refresh, check for a long time, the last discovery is the reason for the file, I test the file is a index.html file, but the contents of the file is only a few words or strings, rather than some HTML code, as follows:
Index.html:
123456
When such or similar numbers are in the index.html file, the plugin cannot be refreshed automatically. It can only be refreshed automatically when it contains HTML code, such as:
Index.html:
<! DOCTYPE html>
When you modify the HTML file, you can change the number inside the automatic refresh, go and try it.
Gulp Browser-sync Auto Refresh Plugin