Skip to content

build: livereload not working for cdk changes #5452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2017
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]);
});
}