Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tools/package-tools/gulp/build-tasks-gulp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export function createPackageBuildTasks(packageName: string, requiredPackages: s
// Glob that matches every HTML file in the current package.
const htmlGlob = join(packageRoot, '**/*.html');

// List of watch tasks that need run together with the watch task of the current package.
const dependentWatchTasks = requiredPackages.map(pkgName => `${pkgName}:watch`);

/**
* Main tasks for the package building. Tasks execute the different sub-tasks in the correct
* order.
Expand Down Expand Up @@ -86,7 +89,9 @@ export function createPackageBuildTasks(packageName: string, requiredPackages: s
* Asset tasks. Building SASS files and inlining CSS, HTML files into the ESM output.
*/
task(`${packageName}:assets`, [
`${packageName}:assets:scss`, `${packageName}:assets:copy-styles`, `${packageName}:assets:html`
`${packageName}:assets:scss`,
`${packageName}:assets:copy-styles`,
`${packageName}:assets:html`
]);

task(`${packageName}:assets:scss`, buildScssTask(packageOut, packageRoot, true));
Expand All @@ -102,7 +107,7 @@ export function createPackageBuildTasks(packageName: string, requiredPackages: s
/**
* Watch tasks, that will rebuild the package whenever TS, SCSS, or HTML files change.
*/
task(`${packageName}:watch`, () => {
task(`${packageName}:watch`, dependentWatchTasks, () => {
watch(join(packageRoot, '**/*.+(ts|scss|html)'), [`${packageName}:build`, triggerLivereload]);
});
}