UNPKG

@o3r/dynamic-content

Version:

This module provides a mechanism to retrieve media and data depending on the host or a server specific url.

40 lines 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ngAdd = void 0; const path = require("node:path"); const schematics_1 = require("@angular-devkit/schematics"); const schematics_2 = require("@o3r/schematics"); const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json'); /** * List of external dependencies to be added to the project as peer dependencies */ const dependenciesToInstall = [ '@angular/core', '@angular/platform-browser-dynamic', '@ngrx/store', 'rxjs' ]; /** * List of external dependencies to be added to the project as dev dependencies */ const devDependenciesToInstall = [ '@angular/compiler-cli', 'rxjs' ]; /** * Add Otter dynamic-content to an Angular Project * @param options */ function ngAddFn(options) { /* ng add rules */ return (0, schematics_1.chain)([ (0, schematics_2.ngAddDependenciesRule)(options, packageJsonPath, { dependenciesToInstall, devDependenciesToInstall }) ]); } /** * Add Otter dynamic-content to an Angular Project * @param options */ const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options); exports.ngAdd = ngAdd; //# sourceMappingURL=index.js.map