Skip to content

Commit

Permalink
generate-sample
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Nov 11, 2023
1 parent a13b843 commit 8e33b67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion generators/jdl/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,9 @@ export default class JdlGenerator extends BaseGenerator {
const yoRcFile = this.destinationPath(appPath, '.yo-rc.json');
const oldYoRc: any = fs.readJSON(yoRcFile);
oldYoRc[GENERATOR_JHIPSTER] = oldYoRc[GENERATOR_JHIPSTER] ?? {};
oldYoRc[GENERATOR_JHIPSTER].entities = [...new Set([...oldYoRc[GENERATOR_JHIPSTER].entities ?? [], ...entities.map(e => e.name)])];
oldYoRc[GENERATOR_JHIPSTER].entities = [
...new Set([...(oldYoRc[GENERATOR_JHIPSTER].entities ?? []), ...entities.map(e => e.name)]),
];
fs.writeJSON(yoRcFile, oldYoRc);
}
}
Expand Down

0 comments on commit 8e33b67

Please sign in to comment.