Skip to content

Commit

Permalink
chore: update the @angular/cdk APIs (#4814)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz authored Feb 25, 2020
1 parent 1cb742f commit e7df349
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions schematics/ng-add/setup-project/register-locale.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Rule, Tree } from '@angular-devkit/schematics';
import { getProjectFromWorkspace, getProjectMainFile, getSourceFile } from '@angular/cdk/schematics';
import { getProjectFromWorkspace, getProjectMainFile, parseSourceFile } from '@angular/cdk/schematics';
import {
addSymbolToNgModuleMetadata,
findNodes,
Expand All @@ -20,7 +20,7 @@ export function registerLocale(options: Schema): Rule {
const workspace = getWorkspace(host);
const project = getProjectFromWorkspace(workspace, options.project);
const appModulePath = getAppModulePath(host, getProjectMainFile(project));
const moduleSource = getSourceFile(host, appModulePath);
const moduleSource = parseSourceFile(host, appModulePath);

const locale = getCompatibleLocal(options);
const localePrefix = locale.split('_')[ 0 ];
Expand Down
3 changes: 2 additions & 1 deletion schematics/utils/build-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ import {
Tree
} from '@angular-devkit/schematics';
import { FileSystemSchematicContext } from '@angular-devkit/schematics/tools';
import { getDefaultComponentOptions, getProjectFromWorkspace, ts } from '@angular/cdk/schematics';
import { getDefaultComponentOptions, getProjectFromWorkspace } from '@angular/cdk/schematics';
import { Schema as ComponentOptions, Style } from '@schematics/angular/component/schema';
import * as ts from 'typescript';
import {
addDeclarationToModule,
addEntryComponentToModule,
Expand Down

0 comments on commit e7df349

Please sign in to comment.