本文整理匯總了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);
});