UNPKG

ndc-suez

Version:

Generate standard ndc UI

67 lines (54 loc) 2.31 kB
# Code Generator for NDC (Note de Calcul) To use this package the xlsx file config for NDC is mandatory. It can generate both the angular application and the .Net classes for the api endpoint ## How to use it ### Angular To create the angular app, run the following in your project: ```bash ng g ndc-suez:m --name <note_name> ``` This will generate an angular module with a component with lazy load configuration. #### Example ```bash ng g ndc-suez:m --name Aeration --page S1 --filename Aeration-2.3-specs.xlsx --api-config false --export-prefix Aeration --version Aeration2.3.002 ``` ### Multi page ndc Angular part of NDC with more than one page must use: ```bash ng g ndc-suez:m --name <ndc_name> --filename <filename.xlsx> --page <page_name> --api-config true --version <version_name> --export-prefix <export_prefix> ``` ### Note with group (pages) Note with grouped pages are generated with two command: 1. run previous command with --partial true and --group-name <any_string_group_name> 2. run the following : ```bash ng g ndc-suez:m --name <note_name> --filename <filename.xlsx> --group page1 page2 page3 --group-name <any_string_group_name> ``` the last command will generate only one file, for the groups config ##### NB: use --slave true to prevent adding cases from a page ### Multiple page in one shot ```bash ng g ndc-suez:mp --pages LB4 LB5 --filename OMBR_2-5_specs_v2.xlsx --api-config true --export-prefix OndeorMbr --version OndeorMBR_02.5.002 --partial true --group-name OndeorMbr25 --slave true ``` ### .NET To generate the code for the api endpoint : ```bash ng g ndc-suez:ndc-net-module --name <note_name> ``` ### Multi page ndc (api) ```bash ng g ndc-suez:ndc-net-module --name <note_name> --filename <filename.xlsx> --page <page_name> ``` ## Example ```bash ng g ndc-suez:ndc-net-module --name OndeorMbrLe3 --filename OMBR_2-5_specs_v2.xlsx --page LE3 CREATE OndeorMbrLe3/OndeorMbrLe3Parameters.cs (15154 bytes) CREATE OndeorMbrLe3/OndeorMbrLe3Dto.cs (29036 bytes) CREATE OndeorMbrLe3/OndeorMbrLe3ResultDto.cs (11460 bytes) CREATE OndeorMbrLe3/Constants.json (19972 bytes) CREATE OndeorMbrLe3/OndeorMbrLe3Export.cs (34394 bytes) CREATE OndeorMbrLe3/OndeorMbrLe3Controller.cs (5066 bytes) ``` ## Warning! The excel file need to be properly formatted. That's it!