import { Rule , SchematicContext , Tree } from '@angular-devkit/schematics' ; import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks' ; import { addPackageToPackageJson } from './package-config' ; import { ngMaterialProVersion } from './version-names' ; export function ngAdd ( ) { return ( host , context ) => { addPackageToPackageJson ( host , '@notadd/ng-material-pro' , `~${ ngMaterialProVersion }` ) ; context . logger . log ( 'info' , `✅️ Added @notadd/ng-material-pro into dependencies` ) ; context . addTask ( new NodePackageInstallTask ( ) ) ; context . logger . log ( 'info' , `🔍 Installing packages...` ) ; } ; }