本文整理汇总了TypeScript中material2-build-tools.watchFiles函数的典型用法代码示例。如果您正苦于以下问题:TypeScript watchFiles函数的具体用法?TypeScript watchFiles怎么用?TypeScript watchFiles使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了watchFiles函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: task
task(':watch:devapp', () => {
watchFiles(join(appDir, '**/*.ts'), [':build:devapp:ts']);
watchFiles(join(appDir, '**/*.scss'), [':build:devapp:scss']);
watchFiles(join(appDir, '**/*.html'), [':build:devapp:assets']);
// The themes for the demo-app are built by the demo-app using the SCSS mixins from Material.
// Therefore when SCSS files have been changed, the custom theme needs to be rebuilt.
watchFiles(join(materialOutPath, '**/*.scss'), [':build:devapp:scss']);
});
示例2: task
task(':watch:devapp', () => {
watchFiles(join(appDir, '**/*.ts'), [':build:devapp:ts']);
watchFiles(join(appDir, '**/*.scss'), [':build:devapp:scss']);
watchFiles(join(appDir, '**/*.html'), [':build:devapp:assets']);
// Custom watchers for all packages that are used inside of the demo-app. This is necessary
// because we only want to build the changed package (using the build-no-bundles task).
watchFiles(join(cdkPackage.sourceDir, '**/*'), ['cdk:build-no-bundles']);
watchFiles(join(materialPackage.sourceDir, '**/!(*.scss)'), ['material:build-no-bundles']);
watchFiles(join(materialPackage.sourceDir, '**/*.scss'), [':build:devapp:material-with-styles']);
watchFiles(join(momentAdapterPackage.sourceDir, '**/*'),
['material-moment-adapter:build-no-bundles']);
watchFiles(join(materialExperimentalPackage.sourceDir, '**/*'),
['material-experimental:build-no-bundles']);
watchFiles(join(cdkExperimentalPackage.sourceDir, '**/*'),
['cdk-experimental:build-no-bundles']);
watchFiles(join(examplesPackage.sourceDir, '**/*'), ['material-examples:build-no-bundles']);
});
示例3: task
task(':watch:devapp', () => {
watchFiles(join(appDir, '**/*.ts'), [':build:devapp:ts']);
watchFiles(join(appDir, '**/*.scss'), [':build:devapp:scss']);
watchFiles(join(appDir, '**/*.html'), [':build:devapp:assets']);
// Custom watchers for the CDK, Material and Moment adapter package. This is necessary because
// we only want to build the package as a single entry-point (using the tests task).
watchFiles(join(cdkPackage.sourceDir, '**/*'), ['cdk:build-no-bundles']);
watchFiles(join(materialPackage.sourceDir, '**/!(*.scss)'), ['material:build-no-bundles']);
watchFiles(join(materialPackage.sourceDir, '**/*.scss'), [':build:devapp:material-with-styles']);
watchFiles(join(momentAdapterPackage.sourceDir, '**/*'),
['material-moment-adapter:build-no-bundles']);
});
示例4: task
task(':watch:devapp', () => {
watchFiles(join(appDir, '**/*.ts'), [':build:devapp:ts']);
watchFiles(join(appDir, '**/*.scss'), [':watch:devapp:rebuild-scss']);
watchFiles(join(appDir, '**/*.html'), [':watch:devapp:rebuild-html']);
// Custom watchers for all packages that are used inside of the demo-app. This is necessary
// because we only want to build the changed package (using the build-no-bundles task).
// CDK package watchers.
watchFiles(join(cdkPackage.sourceDir, '**/*'), ['cdk:build-no-bundles']);
const materialCoreThemingGlob = join(materialPackage.sourceDir, '**/core/theming/**/*.scss');
// Material package watchers.
watchFiles([
join(materialPackage.sourceDir, '**/!(*-theme.scss)'), `!${materialCoreThemingGlob}`
], ['material:build-no-bundles']);
watchFiles([
join(materialPackage.sourceDir, '**/*-theme.scss'), materialCoreThemingGlob
], [':build:devapp:scss']);
// Moment adapter package watchers
watchFiles(join(momentAdapterPackage.sourceDir, '**/*'),
['material-moment-adapter:build-no-bundles']);
// Material experimental package watchers
watchFiles(join(materialExperimentalPackage.sourceDir, '**/*'),
['material-experimental:build-no-bundles']);
// CDK experimental package watchers
watchFiles(join(cdkExperimentalPackage.sourceDir, '**/*'),
['cdk-experimental:build-no-bundles']);
// Example package watchers.
watchFiles(join(examplesPackage.sourceDir, '**/*'), ['material-examples:build-no-bundles']);
});
示例5: task
task(':watch:e2eapp', () => {
watchFiles(join(appDir, '**/*.ts'), ['e2e-app:build'], false);
watchFiles(join(appDir, '**/*.html'), ['e2e-app:copy-assets'], false);
});
示例6: watchFilesAndReload
export function watchFilesAndReload(fileGlob: string | string[], tasks: string[]) {
watchFiles(fileGlob, [...tasks, () => getActiveBrowserSyncInstance().reload()]);
}
示例7: task
task(':e2e:watch', () => {
watchFiles([join(appDir, '**/*.+(html|ts|css)'), join(e2eTestDir, '**/*.+(html|ts)')],
[':e2e:rerun'], false);
});