nl_tokens: Generate module file based on metadata from generated components
pl_tokens: function generateModuleFile ( componentsMetadata , demoAppDocsModuleDir ) { const imports = componentsMetadata . map ( componentMetadata => ` ${ componentMetadata . name } ${ componentMetadata . <mask> } ` ) . join ( '\n' ) ; const components = componentsMetadata . map ( componentMetadata => ` ${ componentMetadata . name } ` ) . join ( '\n' ) ; const routes = componentsMetadata . map ( componentMetadata => ` ${ componentMetadata . route } ${ componentMetadata . name } ` ) . join ( '\n' ) ; const moduleTsFileContents = ` ${ imports } ${ routes } ${ components } ${ components } ` ; const moduleTsFile = path . join ( demoAppDocsModuleDir , 'docs.module.ts' ) ; fs . writeFileSync ( moduleTsFile , moduleTsFileContents , { encoding : 'utf8' } ) ; }