-
Notifications
You must be signed in to change notification settings - Fork 755
Closed
Description
Issue details
The documentation states that for the files attribute under browsersync options, that I can use patterns following Anymatch api.
Browsersync can watch your files as you work. Changes you make will either be injected into the page (CSS & images) or will cause all browsers to do a full-page refresh. See anymatch for more information on glob patterns.
However when using functions or anything that is not a string within files[n].match, I get an error:
/Users/zanona/Developer/libs/bs-less/node_modules/chokidar/index.js:553
throw new TypeError('Non-string provided as watch path: ' + paths);
Steps to reproduce/test case
browsersync.init({
files: [
{
options: { ignoreInitial: false },
match: [
function (p) {
return !/bower_components|node_modules/.test(p);
},
serverPath + '**.html'
],
fn: onHTMLChange
}
]
});Please specify which version of Browsersync, node and npm you're running
- Browsersync [ 2.12.8]
- Node [5.7.1]
- Npm [3.6.0]
Affected platforms
- linux
- windows
- OS X
- freebsd
- solaris
- other (please specify which)
Browsersync use-case
- API
- Gulp
- Grunt
- CLI
Metadata
Metadata
Assignees
Labels
No labels