MCPcopy Index your code
hub / github.com/angular/angular-cli / addDependencies

Function addDependencies

packages/schematics/angular/service-worker/index.ts:37–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35import { Schema as ServiceWorkerOptions } from './schema';
36
37function 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
48function updateAppModule(mainPath: string): Rule {
49 return (host: Tree, context: SchematicContext) => {

Callers 1

index.tsFile · 0.70

Calls 2

getDependencyFunction · 0.90
addDependencyFunction · 0.90

Tested by

no test coverage detected