UNPKG

@o3r/localization

Version:

This module provides a runtime dynamic language/translation support and debug tools.

33 lines 1.41 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.registerDevtools = void 0; const node_fs_1 = require("node:fs"); const path = require("node:path"); const schematics_1 = require("@angular-devkit/schematics"); const schematics_2 = require("@o3r/schematics"); const DEVTOOL_MODULE_NAME = 'LocalizationDevtoolsModule'; const MESSAGE_DEVTOOL_SERVICE_NAME = 'LocalizationDevtoolsMessageService'; const CONSOLE_DEVTOOL_SERVICE_NAME = 'LocalizationDevtoolsConsoleService'; const PACKAGE_NAME = JSON.parse((0, node_fs_1.readFileSync)(path.resolve(__dirname, '..', '..', '..', 'package.json'), { encoding: 'utf8' })).name; /** * Register Devtools to the application * @param options */ const registerDevtools = (options) => { return (0, schematics_1.chain)([ (0, schematics_2.registerDevtoolsToApplication)({ moduleName: DEVTOOL_MODULE_NAME, packageName: PACKAGE_NAME, serviceName: MESSAGE_DEVTOOL_SERVICE_NAME, projectName: options.projectName }), (0, schematics_2.registerDevtoolsToApplication)({ moduleName: DEVTOOL_MODULE_NAME, packageName: PACKAGE_NAME, serviceName: CONSOLE_DEVTOOL_SERVICE_NAME, projectName: options.projectName }) ]); }; exports.registerDevtools = registerDevtools; //# sourceMappingURL=devtools-registration.js.map