()
| 35 | import { Schema as ServiceWorkerOptions } from './schema'; |
| 36 | |
| 37 | function addDependencies(): Rule { |
| 38 | return (host: Tree) => { |
| 39 | const coreDep = getDependency(host, '@angular/core'); |
| 40 | if (!coreDep) { |
| 41 | throw new SchematicsException('Could not find "@angular/core" version.'); |
| 42 | } |
| 43 | |
| 44 | return addDependency('@angular/service-worker', coreDep.version); |
| 45 | }; |
| 46 | } |
| 47 | |
| 48 | function updateAppModule(mainPath: string): Rule { |
| 49 | return (host: Tree, context: SchematicContext) => { |
no test coverage detected