let changed = files => { if (!(files instanceof Array)) { files = [files]; } browserSync.reload(files); };
let changed = files => { if (!(files instanceof Array)) { files = [files]; } browserSync.reload(files); // tinylr.changed({ // body: { files } // }); };
export function changed(files) { if(!(files instanceof Array)) { files = [files]; } if (sync.active) { sync.reload(files); } };
/** * */ function buildStyles() { return src(_src()) .pipe(plug.sourcemaps.init()) .pipe(plug.sass()) .pipe(plug.sourcemaps.write('.')) .pipe(dest('tmp/serve')) .pipe(browserSync.reload({ stream: true })) .pipe(dest('src')) }
let changed = files => { if (!(files instanceof Array)) { files = [files]; } // if (ENABLE_HOT_LOADING) { // ng2HotLoader.onChange(files); // } else { browserSync.reload(files); // } };
gulp.task("less", () => { gulp.src(lessPath) .pipe(p.plumber()) .pipe(p.sourcemaps.init()) .pipe(p.less()) .pipe(p.autoprefixer()) .pipe(p.sourcemaps.write()) .pipe(gulp.dest("dist/public")) .pipe(browserSync.reload({ stream: true })); });
let changed = (files: any) => { if (!(files instanceof Array)) { files = [files]; } // if (ENABLE_HOT_LOADING) { // ng2HotLoader.onChange(files); // } else { //TODO: Figure out why you can't pass a file to reload browserSync.reload(files.path); //} };
let changed = (files: any) => { if (!(files instanceof Array)) { files = [files]; } let onlyStylesChanged = files .map((f:string) => path.parse(f).ext) .reduce((prev:string, current:string) => prev && (current === '.scss' || current === '.css'), true); // if (ENABLE_HOT_LOADING) { // ng2HotLoader.onChange(files); // } else { //TODO: Figure out why you can't pass a file to reload if (onlyStylesChanged === false) { browserSync.reload(files); }else { browserSync.reload('*.css'); } //} };
let changed = (files: any) => { if (!(files instanceof Array)) { files = [files]; } let onlyStylesChanged = files .map((f:string) => path.parse(f)) .reduce((prev:boolean, current:path.ParsedPath) => { return prev && (current.ext === '.scss' || current.ext === '.css') && !current.name.endsWith(".component") }, true); // // if (ENABLE_HOT_LOADING) { // ng2HotLoader.onChange(files); // } else { //TODO: Figure out why you can't pass a file to reload if (onlyStylesChanged === false) { browserSync.reload(); } else { browserSync.reload('**/*.css'); } //} };
baseDir: "./" } }; // config only browserSync(config); // config + callback browserSync(config, function (err, bs) { if (!err) { console.log("BrowserSync is ready!"); } }); // browser reload browserSync.reload(); // single file browserSync.reload( "styles.css" ); // multiple files browserSync.reload( ["styles.css", "ie.css"] ); // streams support browserSync.reload( { stream: true } ); browserSync.notify("Compiling, please wait!"); browserSync.notify("HTML <span color='green'>is supported</span> too!"); // Since 1.3.0, specify a timeout