fix(schematics): @angular/material schematics not working (#13406)

* Due to the upgrade to TypeScript 3.0.0 and the fact that we refer to the actual sources instead of `../../../dist/packages/cdk` (for path mappings), TypeScript will output the Material schematics in an incorrect output structure. This can be fixed by taking advantage of the new "Project References" feature.

https://github.com/angular/material2-builds/tree/master/schematics/lib/schematics (Notice the additional `lib/schematics` folder in the `@angular/material/schematics` folder).
This commit is contained in:
Paul Gschwendtner
2018-10-03 23:16:42 +02:00
committed by vivian-hu
parent 4bee73b3af
commit 3f8ee748dd
3 changed files with 9 additions and 2 deletions
+2
View File
@@ -1,5 +1,7 @@
{
"compilerOptions": {
"composite": true,
"declaration": true,
"lib": ["es2017"],
"module": "commonjs",
"moduleResolution": "node",
+2 -1
View File
@@ -6,6 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {RuleUpgradeData} from '@angular/cdk/schematics';
import {
attributeSelectors,
classNames,
@@ -19,7 +20,7 @@ import {
} from './data';
/** Upgrade data that will be used for the Angular Material ng-update schematic. */
export const materialUpgradeData = {
export const materialUpgradeData: RuleUpgradeData = {
attributeSelectors,
classNames,
constructorChecks,
+5 -1
View File
@@ -9,6 +9,7 @@
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"sourceMap": true,
"declaration": true,
"target": "es6",
"types": [
"jasmine",
@@ -16,9 +17,12 @@
],
"baseUrl": ".",
"paths": {
"@angular/cdk/schematics": ["../../cdk/schematics/"]
"@angular/cdk/schematics": ["../../cdk/schematics"]
}
},
"references": [
{"path": "../../cdk/schematics"}
],
"exclude": [
"**/*.spec.ts",
// Exclude the test-setup utility files. Those should not be part of the output.