UNPKG

@rxap/schematics-ts-morph

Version:

This package provides utilities for manipulating TypeScript code using ts-morph, particularly for Angular and NestJS projects. It offers functions to add, coerce, and modify code elements like classes, methods, decorators, and imports. The package also in

21 lines 875 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HasTableComponent = HasTableComponent; const has_component_1 = require("./has-component"); const build_angular_base_path_1 = require("./build-angular-base-path"); const path_1 = require("path"); const utilities_1 = require("@rxap/utilities"); function HasTableComponent(host, options) { let { name } = options; name = (0, utilities_1.CoerceSuffix)(name, '-table'); if (!(0, has_component_1.HasComponent)(host, options)) { return false; } let basePath = (0, build_angular_base_path_1.BuildAngularBasePath)(host, options); if (!basePath.endsWith(name)) { basePath = (0, path_1.join)(basePath, name); } const fullPath = (0, path_1.join)(basePath, name + '.ts'); return host.exists(fullPath); } //# sourceMappingURL=has-table-component.js.map