build: clean up build workaround for ts 2.9 (#12912)

Removes a workaround that was initially introduced to get #12182 through. The root issue has been resolved in #12876.
This commit is contained in:
Kristiyan Kostadinov
2018-08-30 23:35:29 +02:00
committed by Jeremy Elbourn
parent b2d74e163e
commit b2ae3f4a9d
+2 -17
View File
@@ -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');
@@ -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'
));
@@ -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;
});