Browser Sync and watching multiple folders

Caleb Prenger picture Caleb Prenger · Apr 15, 2016 · Viewed 14.1k times · Source

I'm using browser sync that I installed with NPM to watch my projects as I work on them. Is there a way to get it to watch the root folder and the css folder at once?

Answer

Antoine picture Antoine · Jun 24, 2016

A bit late, but still, since I needed it I'll post it here for future reference :

Either start browser-sync init and add something like this to the bs-config.js file :

files: ["app/css/style.css", "app/js/*.js"]

or start browser-sync with following option :

browser-sync start --server --files="**/*"

This will load current directory AND every other subdirectory.

source : https://www.browsersync.io/docs/options/