UNPKG

@nxrocks/nx-spring-boot

Version:

Nx Plugin to generate, run, package, build (and more) Spring Boot projects inside your Nx workspace

34 lines 1.71 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.projectGenerator = projectGenerator; const lib_1 = require("./lib"); const index_1 = require("../../index"); const plugin_1 = require("../../graph/plugin"); const common_jvm_1 = require("@nxrocks/common-jvm"); async function projectGenerator(tree, options) { const normalizedOptions = await (0, lib_1.normalizeOptions)(tree, options); await (0, lib_1.promptBootDependencies)(normalizedOptions); await (0, lib_1.promptForMultiModuleSupport)(tree, normalizedOptions); (0, lib_1.generateProjectConfiguration)(tree, normalizedOptions); await (0, lib_1.generateBootProject)(tree, normalizedOptions); (0, lib_1.addBuilInfoTask)(tree, normalizedOptions); if (normalizedOptions.projectType === 'library') { // 'library' projects should not be "spring-boot- executable" if (normalizedOptions.buildSystem === 'maven-project') { (0, lib_1.removeBootMavenPlugin)(tree, normalizedOptions); } else { (0, lib_1.disableBootGradlePlugin)(tree, normalizedOptions); (0, lib_1.removeBootBuildImageGradleTask)(tree, normalizedOptions); } (0, lib_1.createLibraryFiles)(tree, normalizedOptions); } (0, lib_1.addMavenPublishPlugin)(tree, normalizedOptions); if (!options.skipFormat) { //if skipFormat is true, then we don't want to add Spotless plugin (0, lib_1.addFormattingWithSpotless)(tree, normalizedOptions); } (0, common_jvm_1.addPluginToNxJson)(index_1.NX_SPRING_BOOT_PKG, tree, (0, plugin_1.normalizePluginOptions)()); } exports.default = projectGenerator; //# sourceMappingURL=generator.js.map