BrowserSync / browser-sync

Keep multiple browsers & devices in sync when building websites. https://browsersync.io
https://discord.gg/2d2xUThp
Apache License 2.0
12.19k stars 757 forks source link

BrowserSync doesn't detect changes to .ejs (Embedded JavaScript) files #389

Closed komplexb closed 9 years ago

komplexb commented 9 years ago

I'm using .ejs files with HarpJS static web server. This command --files "enrollment/*.ejs, enrollment/css/*" detects changes to my .less files but not to the .ejs files. Is there a command or config I can try to get this to work?

HarpJS compiles the .ejs files on the fly so there isn't a build directory I can tell BrowserSync to watch. I just figured once I saved it would diff the file and refresh browsers using the BrowserSync URL.

komplexb commented 9 years ago

Solved with: http://ole.michelsen.dk/blog/using-browser-sync-with-harp.html

stevenventimiglia commented 6 years ago

Using Gulp, you can also add gulp.watch('path/**/*.ejs').on('change', browserSync.reload); to your watch task.