1- import { chain , noop , Rule , Tree , SchematicContext , SchematicsException } from '@angular-devkit/schematics' ;
1+ /**
2+ * @license
3+ * Copyright Google LLC All Rights Reserved.
4+ *
5+ * Use of this source code is governed by an MIT-style license that can be
6+ * found in the LICENSE file at https://angular.io/license
7+ */
8+
9+ import {
10+ chain ,
11+ noop ,
12+ Rule ,
13+ SchematicContext ,
14+ SchematicsException ,
15+ Tree ,
16+ } from '@angular-devkit/schematics' ;
217import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks' ;
318import { addModuleImportToRootModule , getStylesPath } from '../utils/ast' ;
419import { InsertChange } from '../utils/devkit-utils/change' ;
@@ -10,7 +25,6 @@ import {Schema} from './schema';
1025import { addThemeToAppStyles } from './theming' ;
1126import * as parse5 from 'parse5' ;
1227
13-
1428/**
1529 * Scaffolds the basics of a Angular Material application, this includes:
1630 * - Add Packages to package.json
@@ -19,7 +33,8 @@ import * as parse5 from 'parse5';
1933 */
2034export default function ( options : Schema ) : Rule {
2135 if ( ! parse5 ) {
22- throw new SchematicsException ( 'parse5 depedency not found! Please install parse5 from npm to continue.' ) ;
36+ throw new SchematicsException ( 'Parse5 is required but could not be found! Please install ' +
37+ '"parse5" manually in order to continue.' ) ;
2338 }
2439
2540 return chain ( [
@@ -80,7 +95,7 @@ function addBodyMarginToStyles(options: Schema) {
8095 const workspace = getWorkspace ( host ) ;
8196 const project = getProjectFromWorkspace ( workspace , options . project ) ;
8297
83- const stylesPath = getStylesPath ( host , project ) ;
98+ const stylesPath = getStylesPath ( project ) ;
8499
85100 const buffer = host . read ( stylesPath ) ;
86101 if ( buffer ) {
0 commit comments