77
88namespace TypeScriptDefinitionGenerator
99{
10+ public enum EOLType
11+ {
12+ /// <summary>Unix</summary>
13+ LF ,
14+
15+ /// <summary>Windows</summary>
16+ CRLF
17+ }
18+
1019 public class OptionsDialogPage : DialogPage
1120 {
1221 internal const bool _defCamelCaseEnumerationValues = false ;
@@ -20,6 +29,7 @@ public class OptionsDialogPage : DialogPage
2029 internal const bool _defUseNamespace = true ;
2130 internal const bool _defDeclareModule = true ;
2231 internal const bool _defIgnoreIntellisense = true ;
32+ internal const EOLType _defEOLType = EOLType . LF ;
2333
2434 [ Category ( "Casing" ) ]
2535 [ DisplayName ( "Camel case enum values" ) ]
@@ -69,6 +79,12 @@ public class OptionsDialogPage : DialogPage
6979 [ Description ( "Ignore intellisense for client side reference names" ) ]
7080 [ DefaultValue ( _defIgnoreIntellisense ) ]
7181 public bool IgnoreIntellisense { get ; set ; } = _defIgnoreIntellisense ;
82+
83+ [ Category ( "Settings" ) ]
84+ [ DisplayName ( "End Of Line (EOL)" ) ]
85+ [ Description ( "Choose the EOL type Unix/Windows" ) ]
86+ [ DefaultValue ( _defEOLType ) ]
87+ public EOLType EOLType { get ; set ; } = _defEOLType ;
7288 }
7389
7490 public class Options
@@ -93,6 +109,8 @@ public class Options
93109
94110 public static bool IgnoreIntellisense => overrides ? . IgnoreIntellisense ?? DtsPackage . Options . IgnoreIntellisense ;
95111
112+ public static EOLType EOLType => overrides ? . EOLType ?? DtsPackage . Options . EOLType ;
113+
96114 public static bool WebEssentials2015 => overrides ? . WebEssentials2015 ?? DtsPackage . Options . WebEssentials2015 ;
97115
98116 public static void ReadOptionOverrides ( ProjectItem sourceItem , bool display = true )
@@ -180,8 +198,9 @@ internal class OptionsOverride
180198 public bool IgnoreIntellisense { get ; set ; } = OptionsDialogPage . _defIgnoreIntellisense ;
181199
182200 // [JsonRequired]
183- public bool WebEssentials2015 { get ; set ; } = OptionsDialogPage . _defWebEssentials2015 ;
201+ public EOLType EOLType { get ; set ; } = OptionsDialogPage . _defEOLType ;
184202
203+ // [JsonRequired]
204+ public bool WebEssentials2015 { get ; set ; } = OptionsDialogPage . _defWebEssentials2015 ;
185205 }
186-
187- }
206+ }
0 commit comments