Subtheme of barrio
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
625 B

/**
* Require Browsersync
*/
var browserSync = require('browser-sync').create();
var fs = require('fs');
/**
* Run Browsersync with server config
*/
browserSync.init({
server: 'app',
files: ['app/*.html', 'app/css/*.css'],
rewriteRules: [
{
match: /@include\("(.+?)"\)/g,
fn: function (match, filename) {
if (fs.existsSync(filename)) {
return fs.readFileSync(filename);
} else {
return '<span style="color: red">'+filename+' could not be found</span>';
}
}
}
]
});