File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ export default class extends BaseGenerator {
9393
9494 for ( const file of await prepareSample (
9595 this . destinationPath ( ) ,
96- this . data . files . filter ( file => file . type === 'yo-rc' ) ,
96+ this . data . files . filter ( file => [ 'yo-rc' , 'json' ] . includes ( file . type ) ) ,
9797 ) ) {
9898 this . writeDestination ( file . filename , file . content ) ;
9999 }
Original file line number Diff line number Diff line change 11import { removeFieldsWithNullishValues } from '../../base/support/index.js' ;
22import { GENERATOR_JHIPSTER } from '../../generator-constants.js' ;
33
4- export type InfoFile = { filename : string ; content : string ; type : 'jdl' | 'yo-rc' | 'entity-jdl' } ;
4+ export type InfoFile = { filename : string ; content : string ; type : 'jdl' | 'yo-rc' | 'entity-jdl' | 'json' } ;
55
66export type InfoData = {
77 yoRcContent : string | undefined ;
@@ -34,6 +34,8 @@ export const extractDataFromInfo = (info: string): InfoData => {
3434 yoRcContent = body . trim ( ) ;
3535 files . push ( { filename : '.yo-rc.json' , content : yoRcContent , type : 'yo-rc' } ) ;
3636 }
37+ } else if ( title . includes ( ' file' ) ) {
38+ files . push ( { filename : title . split ( ' file' ) [ 0 ] . trim ( ) , content : body . trim ( ) , type : 'json' } ) ;
3739 } else if ( title . includes ( 'JDL entity definitions' ) ) {
3840 jdlEntitiesDefinitions = body . trim ( ) ;
3941 files . push ( { filename : 'entities.jdl' , content : jdlEntitiesDefinitions , type : 'entity-jdl' } ) ;
You can’t perform that action at this time.
0 commit comments