Skip to content

build: clean up build workaround for ts 2.9 #12912

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
Aug 30, 2018
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
19 changes: 2 additions & 17 deletions tools/gulp/tasks/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import {task, src, dest} from 'gulp';
import {task} from 'gulp';
import {join} from 'path';
import {ngcBuildTask, copyTask, execNodeTask, serverTask} from '../util/task_helpers';
import {copySync} from 'fs-extra';
import {buildConfig, sequenceTask, triggerLivereload, watchFiles} from 'material2-build-tools';
import {sync as globSync} from 'glob';

// There are no type definitions available for these imports.
const gulpConnect = require('gulp-connect');
Expand Down Expand Up @@ -69,7 +68,7 @@ task('e2e-app:build', sequenceTask(
'material-moment-adapter:build-release',
'material-examples:build-release'
],
['e2e-app:copy-release', 'e2e-app:copy-typings', 'e2e-app:copy-assets'],
['e2e-app:copy-release', 'e2e-app:copy-assets'],
'e2e-app:build-ts'
));

Expand Down Expand Up @@ -115,17 +114,3 @@ task('e2e-app:copy-release', () => {
copySync(join(releasesDir, 'material-examples'), join(outDir, 'material-examples'));
copySync(join(releasesDir, 'material-moment-adapter'), join(outDir, 'material-moment-adapter'));
});

// Copy the core declaration files next to the declarations of each module. This is a workaround
// for an issue in TypeScript 2.9 where the generated declaration files have wrong import paths.
// We should be able to remove this task once we update to TypeScript 3.0.
// See: https://github.com/Microsoft/TypeScript/issues/25511.
task('e2e-app:copy-typings', () => {
const stream = src(join(outDir, 'material/core/typings/*/**'));

globSync(join(outDir, 'material/!(core)/')).forEach(directory => {
stream.pipe(dest(join(directory, 'core')));
});

return stream;
});