Skip to content

Commit 1e96b01

Browse files
devversionmmalerba
authored andcommitted
build: create dev-app deploy output in separate directory (#14373)
* This fixes that `serve:devapp` does not work after building the deploy output of the `dev-app` (e.g. when deploying to firebase)
1 parent c28a91e commit 1e96b01

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

tools/gulp/tasks/development.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,24 @@ task('serve:devapp', ['build:devapp'], sequenceTask([':serve:devapp', ':watch:de
8383

8484
/** Task that copies all vendors into the dev-app package. Allows hosting the app on firebase. */
8585
task('stage-deploy:devapp', ['build:devapp'], () => {
86-
copyFiles(join(projectDir, 'node_modules'), vendorGlob, join(outDir, 'node_modules'));
87-
copyFiles(bundlesDir, '*.+(js|map)', join(outDir, 'dist/bundles'));
88-
copyFiles(cdkPackage.outputDir, '**/*.+(js|map)', join(outDir, 'dist/packages/cdk'));
89-
copyFiles(materialPackage.outputDir, '**/*.+(js|map)', join(outDir, 'dist/packages/material'));
86+
const deployOutputDir = join(outputDir, 'devapp-deploy');
87+
88+
copyFiles(outDir, '**/*.+(css|js|map)', deployOutputDir);
89+
copyFiles(join(projectDir, 'node_modules'), vendorGlob, join(deployOutputDir, 'node_modules'));
90+
copyFiles(bundlesDir, '*.+(js|map)', join(deployOutputDir, 'dist/bundles'));
91+
copyFiles(cdkPackage.outputDir, '**/*.+(js|map)', join(deployOutputDir, 'dist/packages/cdk'));
92+
copyFiles(materialPackage.outputDir, '**/*.+(js|map)',
93+
join(deployOutputDir, 'dist/packages/material'));
9094
copyFiles(materialExperimentalPackage.outputDir, '**/*.+(js|map)',
91-
join(outDir, 'dist/packages/material-experimental'));
95+
join(deployOutputDir, 'dist/packages/material-experimental'));
9296
copyFiles(cdkExperimentalPackage.outputDir, '**/*.+(js|map)',
93-
join(outDir, 'dist/packages/cdk-experimental'));
97+
join(deployOutputDir, 'dist/packages/cdk-experimental'));
9498
copyFiles(materialPackage.outputDir, '**/prebuilt/*.+(css|map)',
95-
join(outDir, 'dist/packages/material'));
99+
join(deployOutputDir, 'dist/packages/material'));
96100
copyFiles(examplesPackage.outputDir, '**/*.+(js|map)',
97-
join(outDir, 'dist/packages/material-examples'));
101+
join(deployOutputDir, 'dist/packages/material-examples'));
98102
copyFiles(momentAdapterPackage.outputDir, '**/*.+(js|map)',
99-
join(outDir, 'dist/packages/material-moment-adapter'));
103+
join(deployOutputDir, 'dist/packages/material-moment-adapter'));
100104
});
101105

102106
/**

0 commit comments

Comments
 (0)