UNPKG

@o3r/routing

Version:

This module helps you to configure an Otter application's routing (POST parameter management, preloading strategy, guard recommendation).

25 lines 858 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ngAdd = void 0; const path = require("node:path"); const schematics_1 = require("@o3r/schematics"); const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json'); /** * Add Otter routing to an Angular Project * @param options */ function ngAddFn(options) { return (tree) => { return (0, schematics_1.setupDependencies)({ projectName: options.projectName, dependencies: (0, schematics_1.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion) }); }; } /** * Add Otter routing to an Angular Project * @param options */ const ngAdd = (options) => (0, schematics_1.createOtterSchematic)(ngAddFn)(options); exports.ngAdd = ngAdd; //# sourceMappingURL=index.js.map