Skip to content

Commit ea62c1b

Browse files
committed
- Update comments in default ReactConfig.cs.pp to reflect Babel changes.
- [MSBuild] Update TransformJsx to TransformBabel Closes reactjs#173
1 parent 4dffd74 commit ea62c1b

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="TransformBabel">
3+
<!-- ReactJS.NET - Transpile JavaScript via Babel -->
4+
<UsingTask AssemblyFile="$(OutputPath)\React.MSBuild.dll" TaskName="TransformBabel" />
5+
<Target Name="TransformBabel">
6+
<TransformBabel SourceDir="$(MSBuildProjectDirectory)" />
7+
</Target>
8+
</Project>

src/React.MSBuild/Content/TransformJsx.proj

-8
This file was deleted.

src/React.MSBuild/React.MSBuild.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
</ProjectReference>
6767
</ItemGroup>
6868
<ItemGroup>
69-
<None Include="Content\TransformJsx.proj" />
69+
<None Include="Content\TransformBabel.proj" />
7070
<None Include="tools\install.ps1" />
7171
<None Include="React.MSBuild.nutrans" />
7272
<None Include="tools\uninstall.ps1" />

src/React.MSBuild/React.MSBuild.nutrans

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ of patent rights can be found in the PATENTS file in the same directory.
1717
<tags xdt:Transform="Replace">asp.net mvc asp jquery javascript js react facebook reactjs msbuild babel</tags>
1818
</metadata>
1919
<files xdt:Transform="Insert">
20-
<file src="Content\TransformJsx.proj" target="Content\" />
20+
<file src="Content\TransformBabel.proj" target="Content\" />
2121
<file src="tools\install.ps1" target="tools\" />
2222
<file src="tools\uninstall.ps1" target="tools\" />
2323
</files>

src/React.Web/Content/App_Start/ReactConfig.cs.pp

+8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
//ReactSiteConfiguration.Configuration
1616
// .AddScript("~/Scripts/First.jsx")
1717
// .AddScript("~/Scripts/Second.jsx");
18+
19+
// If you use an external build too (for example, Babel, Webpack,
20+
// Browserify or Gulp), you can improve performance by disabling
21+
// ReactJS.NET's version of Babel and loading the pre-transpiled
22+
// scripts. Example:
23+
//ReactSiteConfiguration.Configuration
24+
// .SetLoadBabel(false)
25+
// .AddScriptWithoutTransform("~/Scripts/bundle.server.js")
1826
}
1927
}
2028
}

0 commit comments

Comments
 (0)