-
Notifications
You must be signed in to change notification settings - Fork 83
Reinforced.Typings.settings.xml
Since Reinforced.Typings is not a framework itself but build process extension,
therefore settings file is basically piece of MSBuild script.
This file is being imported to your .csproj
during each build the same way
as Reinforced.Typings.targets that is located in its package /build
directory.
Reinforced.Typings has completely few build parameters that are listed below.
Default Reinforced.Typings.settings.xml file is located here ## Table of contents
- RtTargetFile
- RtConfigurationMethod
- RtWriteWarningComment
- RtExportPureTypings
- RtDivideTypesAmongFiles
- RtTargetDirectory
- RtRootNamespace
- RtBypassTypeScriptCompilation
- RtCamelCaseForMethods
- RtCamelCaseForProperties
- RtGenerateDocumentation
- RtDisable
## RtTargetFile (string)
This property points target file where to put generated sources.
It is not used if RtDivideTypesAmongFiles='true'
specified.
Important! Do not forget to include generated file to solution.
## RtConfigurationMethod (string)
This property sets RT configuration method for fluent configuration.
If you dont want to use attributes for some reason then here you can
specify full-qualified configuration method name (including namespace,
type and method name, e.g. My.Assembly.Configuration.ConfigureTypings
)
of method that consumes Reinforced.Typings.Fluent.ConfigurationBuilder
type
and is void (nothing returns). This method will be executed to build
types exporting configuration in fluent manner.
Surely you can continue using attributes. Also fluent configuration methods
could not provide a way to configure some specific things (generics parameters
override and classes' TsBaseParam
). However in this case fluent configuration
would be preferred. It means that if member configuration is supplied both
in attributes and in fluent methods then configuration from fluent methods will
be used.
## RtWriteWarningComment (boolean)
Boolean parameter that controls writing of "auto-generated warning" comment to each generated file.
It meant the comment like "// This code was generated blah blah blah..."
'true
' (default) to write warning comment about auto-generated to every file.
'false
' to do not.
## RtExportPureTypings (boolean)
Since .d.ts
has a slightly different syntax than a regular .ts
file, we have that
boolean parameter that controls generation mode switch between .ts
/.d.ts
If true, export will be performed in .d.ts
manner (only typings, declare module etc).
Otherwise, export will be performed as regular .ts
file
## RtDivideTypesAmongFiles (boolean) By default all of your typings will be located in single file specified by RtTargetFile. It may be heavy for large projects because you will get single large file containing signinficant part of TS sources. It could lead to various problems (e.g. monstrous SCM merges). So here we have RtDivideTypesAmongFiles parameter that will make Reinforced.Typings generate TS sources in C#/Java/somewhat-OO-language-manner (class per file) when set to true.
Important! In case of using this setting, do not forget to add generated files to solution manually.
## RtTargetDirectory (string)
... and if you use RtDivideTypesAmongFiles
then please specify target directory
where to put all generated stuff. Reinforced.Typings will automatically create
directories structure according to used namespaces.
Note that in case of using RtDivideTypesAmongFiles
, RtTargetFile
parameter will
NOT be used anymore.
## RtRootNamespace (string)
Also you have to specify your app's namespace in case of using RtDivideTypesAmongFiles
.
It is needed to make Reinforced.Typings do not create redundant directories under
RtTargetDirectory
since there is no way to determine root namespace programmatically.
## RtBypassTypeScriptCompilation (boolean) Disables typescript compilation in solution. Use it when your TypeScripts are broken and you need to rebuild project and then regenerate typings to fix it, but TypeScript compilation fails and failing project build. This option will temporary disable typescripts build.
## RtCamelCaseForMethods (boolean) When true, forces Reinforced.Typings to generate METHODS names in "camelCase" instead of .NET-common "PascalCase"
## RtCamelCaseForProperties (boolean) When true, forces Reinforced.Typings to generate PROPERTIES names in "camelCase" instead of .NET-common "PascalCase"
## RtGenerateDocumentation (boolean) This settings conditionally disables jsdoc generation from .NET XMLDOC. To use jsdoc generation feature please enable XML documentation generation in your project settings
## RtDisable (boolean) Disables Reinforced.Typings generation on build. Use it when it is necessary to temporary disable typings generation.