UNPKG

generator-begcode

Version:

Spring Boot + Angular/React/Vue in one handy generator

20 lines (19 loc) 648 B
import JDLObject from '../models/jdl-object.js'; import { unaryOptions } from '../jhipster/index.js'; import JDLUnaryOption from '../models/jdl-unary-option.js'; const { SKIP_CLIENT, SKIP_SERVER } = unaryOptions; export default { convertServerOptionsToJDL, }; export function convertServerOptionsToJDL(config, jdl) { const jdlObject = jdl || new JDLObject(); const jhipsterConfig = config || {}; [SKIP_CLIENT, SKIP_SERVER].forEach(option => { if (jhipsterConfig[option] === true) { jdlObject.addOption(new JDLUnaryOption({ name: option, })); } }); return jdlObject; }