@nxrocks/nx-spring-boot
Version:
Nx Plugin to generate, run, package, build (and more) Spring Boot projects inside your Nx workspace
19 lines • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const devkit_1 = require("@nx/devkit");
const boot_utils_1 = require("../../utils/boot-utils");
async function default_1(tree, options) {
const sourceProject = (0, devkit_1.readProjectConfiguration)(tree, options.sourceProjectName);
if (!(0, boot_utils_1.isBootProject)(sourceProject)) {
throw new Error(`The source project (1st argument of this 'link' generator) must be a Spring-Boot project`);
}
const targetProject = (0, devkit_1.readProjectConfiguration)(tree, options.targetProjectName);
const targetProjectImplicitDependencies = targetProject.implicitDependencies || [];
if (!targetProjectImplicitDependencies.includes(options.sourceProjectName)) {
targetProjectImplicitDependencies.push(options.sourceProjectName);
targetProject.implicitDependencies = targetProjectImplicitDependencies;
(0, devkit_1.updateProjectConfiguration)(tree, options.targetProjectName, targetProject);
}
}
//# sourceMappingURL=generator.js.map