本文整理汇总了TypeScript中browser-sync.reload函数的典型用法代码示例。如果您正苦于以下问题:TypeScript reload函数的具体用法?TypeScript reload怎么用?TypeScript reload使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了reload函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1:
let changed = files => {
if (!(files instanceof Array)) {
files = [files];
}
browserSync.reload(files);
};
开发者ID:gitter-badger,项目名称:hydra-admin,代码行数:7,代码来源:code_change_tools.ts
示例2: changed
export function changed(files) {
if(!(files instanceof Array)) {
files = [files];
}
if (sync.active) {
sync.reload(files);
}
};
开发者ID:fellswoop,项目名称:angular-project-template,代码行数:9,代码来源:sync.ts
示例3: buildStyles
/**
*
*/
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'))
}
开发者ID:intraspacedesign,项目名称:intraspacedesign.net,代码行数:12,代码来源:styles.ts
示例4:
let changed = files => {
if (!(files instanceof Array)) {
files = [files];
}
// if (ENABLE_HOT_LOADING) {
// ng2HotLoader.onChange(files);
// } else {
browserSync.reload(files);
// }
};
开发者ID:wuyingki,项目名称:angular2-seed,代码行数:10,代码来源:code_change_tools.ts
示例5:
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 }));
});
开发者ID:markogresak,项目名称:color-wars,代码行数:10,代码来源:gulpfile.ts
示例6:
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);
//}
};
开发者ID:Anhmike,项目名称:scalable-architecture-demo,代码行数:11,代码来源:code_change_tools.ts
示例7:
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');
}
//}
};
开发者ID:AriFreyr,项目名称:EveApp,代码行数:21,代码来源:code_change_tools.ts
示例8:
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');
}
//}
};
开发者ID:giovannicandido,项目名称:angular2-seed,代码行数:23,代码来源:code_change_tools.ts
示例9: browserSync
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
开发者ID:1drop,项目名称:DefinitelyTyped,代码行数:31,代码来源:browser-sync-tests.ts
注:本文中的browser-sync.reload函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论