mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
vivian-hu
parent
4bee73b3af
commit
3f8ee748dd
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"declaration": true,
|
||||
"lib": ["es2017"],
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user