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

20 lines 682 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MergeTsMorphProject = MergeTsMorphProject; const path_1 = require("path"); /** * Copies all files from the source project to the target project. * * The rel path is used to prefix all file path in the source project * * @param target * @param source * @param relPath * @constructor */ function MergeTsMorphProject(target, source, relPath) { for (const sourceFile of source.getSourceFiles()) { target.createSourceFile((0, path_1.join)(relPath, sourceFile.getFilePath()), sourceFile.getFullText(), { overwrite: true }); } } //# sourceMappingURL=merge-ts-morph-project.js.map