@@ -65,7 +65,7 @@ public JsxTransformer(IReactEnvironment environment, ICache cache, IFileSystem f
6565 /// <param name="filename">Name of the file to load</param>
6666 /// <param name="useHarmony"><c>true</c> if support for es6 syntax should be rewritten.</param>
6767 /// <returns>JavaScript</returns>
68- public string TransformJsxFile ( string filename , bool useHarmony = false )
68+ public string TransformJsxFile ( string filename , bool ? useHarmony = null )
6969 {
7070 var fullPath = _fileSystem . MapPath ( filename ) ;
7171
@@ -105,7 +105,7 @@ public string TransformJsxFile(string filename, bool useHarmony = false)
105105 /// <param name="hash">Hash of the input. If null, it will be calculated</param>
106106 /// <param name="useHarmony"><c>true</c> if support for es6 syntax should be rewritten.</param>
107107 /// <returns>JavaScript</returns>
108- private string TransformJsxWithHeader ( string contents , string hash = null , bool useHarmony = false )
108+ private string TransformJsxWithHeader ( string contents , string hash = null , bool ? useHarmony = null )
109109 {
110110 if ( string . IsNullOrEmpty ( hash ) )
111111 {
@@ -121,7 +121,7 @@ private string TransformJsxWithHeader(string contents, string hash = null, bool
121121 /// <param name="input">JSX</param>
122122 /// <param name="useHarmony"><c>true</c> if support for es6 syntax should be rewritten.</param>
123123 /// <returns>JavaScript</returns>
124- public string TransformJsx ( string input , bool useHarmony = false )
124+ public string TransformJsx ( string input , bool ? useHarmony = null )
125125 {
126126 // Just return directly if there's no JSX annotation
127127 if ( ! input . Contains ( "@jsx" ) )
@@ -135,7 +135,7 @@ public string TransformJsx(string input, bool useHarmony = false)
135135 var output = _environment . ExecuteWithLargerStackIfRequired < string > (
136136 "ReactNET_transform" ,
137137 input ,
138- useHarmony
138+ useHarmony . HasValue ? useHarmony . Value : _environment . SiteConfiguration . UseHarmony
139139 ) ;
140140 return output ;
141141 }
@@ -183,7 +183,7 @@ public string GetJsxOutputPath(string path)
183183 /// <param name="filename">Name of the file to load</param>
184184 /// <param name="useHarmony"><c>true</c> if support for es6 syntax should be rewritten.</param>
185185 /// <returns>File contents</returns>
186- public string TransformAndSaveJsxFile ( string filename , bool useHarmony = false )
186+ public string TransformAndSaveJsxFile ( string filename , bool ? useHarmony = null )
187187 {
188188 var outputPath = GetJsxOutputPath ( filename ) ;
189189 var contents = _fileSystem . ReadAsString ( filename ) ;
0 commit comments