diff options
| author | Dean Anderson <dean@locomation.ai> | 2018-09-27 16:51:01 -0400 |
|---|---|---|
| committer | Christoph Schlosser <christophschlosser@users.noreply.github.com> | 2018-09-29 19:08:20 +0200 |
| commit | 4939806ae705953cfc1ca8cf54f20d98e9be9d03 (patch) | |
| tree | 71c291d9c5edd2927f350b2dbdf738ca7ff6dfbf /src/Config.ts | |
| parent | d3452b0a1e9f4424591b5621ee107a95a61300d5 (diff) | |
| download | doxdocgen-4939806ae705953cfc1ca8cf54f20d98e9be9d03.tar.gz | |
customTag will supply ISO date format if user configured format empty
Added separate templates for author name {author} and email {email}
Added method to make multiple template substitutions in a string
customTag will now replace {author}, {email}, {date} and {year} templates
Diffstat (limited to 'src/Config.ts')
| -rw-r--r-- | src/Config.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Config.ts b/src/Config.ts index 54d227a..b33aff2 100644 --- a/src/Config.ts +++ b/src/Config.ts @@ -49,7 +49,9 @@ class Generic { public paramTemplate: string = "@param {param} "; public returnTemplate: string = "@return {type} "; public linesToGet: number = 20; - public authorTag: string = "@author your name"; + public authorName: string = "your name"; + public authorEmail: string = "you@domain.com"; + public authorTag: string = "@author {author} ({email})"; public dateTemplate: string = "@date {date}"; public dateFormat: string = "YYYY-MM-DD"; public generateSmartText: boolean = true; @@ -86,6 +88,8 @@ export class Config { values.Generic.returnTemplate = Generic.getConfiguration().get<string>("returnTemplate", values.Generic.returnTemplate); values.Generic.linesToGet = Generic.getConfiguration().get<number>("linesToGet", values.Generic.linesToGet); values.Generic.authorTag = Generic.getConfiguration().get<string>("authorTag", values.Generic.authorTag); + values.Generic.authorName = Generic.getConfiguration().get<string>("authorName", values.Generic.authorName); + values.Generic.authorEmail = Generic.getConfiguration().get<string>("authorEmail", values.Generic.authorEmail); values.Generic.dateTemplate = Generic.getConfiguration().get<string>("dateTemplate", values.Generic.dateTemplate); values.Generic.dateFormat = Generic.getConfiguration().get<string>("dateFormat", values.Generic.dateFormat); values.Generic.generateSmartText = Generic.getConfiguration().get<boolean>("generateSmartText", values.Generic.generateSmartText); @@ -98,6 +102,8 @@ export class Config { public readonly paramTemplateReplace: string = "{param}"; public readonly typeTemplateReplace: string = "{type}"; public readonly nameTemplateReplace: string = "{name}"; + public readonly authorTemplateReplace: string = "{author}"; + public readonly emailTemplateReplace: string = "{email}"; public readonly dateTemplateReplace: string = "{date}"; public readonly yearTemplateReplace: string = "{year}"; public readonly textTemplateReplace: string = "{text}"; |