serenity-is / Serenity

Business Apps Made Simple with Asp.Net Core MVC / TypeScript
https://serenity.is
MIT License
2.61k stars 802 forks source link

Generating custom files using sergen #3835

Closed dfaruque closed 6 years ago

dfaruque commented 6 years ago

Once upon a time, I have added the feature to generate GridEditor and Dialog. Currently, it is not there for some good reason. That's ok. But we are missing that feature.

https://github.com/volkanceylan/Serenity/issues/3059

Would you please give some hint about generating custom files using sergen?

With kind regards D Faruque

brunobola commented 6 years ago

@dfaruque I've also noticed that feature and missed it :(

volkanceylan commented 6 years ago

Check Generate Custom in Sergen UI, set custom templates path in UI, put GridEditor.scriban in that folder, open Serenity.CodeGenerator.config add such files:

"CustomGenerate": {
   "GridEditor": "{0}GridEditor.ts" 
}
dfaruque commented 6 years ago

Thank you very much @volkanceylan

the following configuration is works

    "CustomGenerate": {
        "GridEditor": "{2}\\{0}GridEditor.ts",
        "EditorDialog": "{2}\\{0}EditorDialog.ts"
    },