Skip to content

Commit 26908e3

Browse files
Normalize line edings
1 parent def1983 commit 26908e3

File tree

19 files changed

+3167
-3167
lines changed

19 files changed

+3167
-3167
lines changed

Diff for: src/React.Core/Babel.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ string filename
353353
var contents = _fileSystem.ReadAsString(filename);
354354
if (CacheIsValid(contents, outputPath))
355355
return outputPath;
356-
356+
357357
var result = TransformWithHeader(filename, contents, null);
358358

359359
var sourceMapPath = GetSourceMapOutputPath(filename);
@@ -363,14 +363,14 @@ string filename
363363
return outputPath;
364364
}
365365

366-
/// <summary>
367-
/// Checks whether an input file (given as inputFileContents) should be transpiled
368-
/// by calculating the hash and comparing it to the hash value stored
369-
/// in the file given by outputPath. If the outputPath file does not
370-
/// exist the input file should always be transpiled.
371-
/// </summary>
372-
/// <param name="inputFileContents">The contents of the input file.</param>
373-
/// <param name="outputPath">The output path of the (possibly previously) generated file.</param>
366+
/// <summary>
367+
/// Checks whether an input file (given as inputFileContents) should be transpiled
368+
/// by calculating the hash and comparing it to the hash value stored
369+
/// in the file given by outputPath. If the outputPath file does not
370+
/// exist the input file should always be transpiled.
371+
/// </summary>
372+
/// <param name="inputFileContents">The contents of the input file.</param>
373+
/// <param name="outputPath">The output path of the (possibly previously) generated file.</param>
374374
/// <returns>Returns false if the file should be transpiled, true otherwise.</returns>
375375
public virtual bool CacheIsValid(string inputFileContents, string outputPath)
376376
{

Diff for: src/React.Core/React.Core.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
2020
</PropertyGroup>
2121

22-
<ItemGroup>
23-
<Compile Remove="node_modules\**" />
24-
<EmbeddedResource Remove="node_modules\**" />
25-
<None Remove="node_modules\**" />
22+
<ItemGroup>
23+
<Compile Remove="node_modules\**" />
24+
<EmbeddedResource Remove="node_modules\**" />
25+
<None Remove="node_modules\**" />
2626
</ItemGroup>
2727

2828
<ItemGroup>

Diff for: src/React.Sample.CoreMvc/Startup.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* This source code is licensed under the BSD-style license found in the
66
* LICENSE file in the root directory of this source tree. An additional grant
77
* of patent rights can be found in the PATENTS file in the same directory.
8-
*/
9-
8+
*/
9+
1010
using System;
1111
using Microsoft.AspNetCore.Builder;
1212
using Microsoft.AspNetCore.Hosting;

Diff for: src/React.Sample.Owin/Content/Index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
</head>
99
<body>
1010
<div id="container"></div>
11-
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.0.0/umd/react.development.js"></script>
12-
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.0.0/umd/react-dom.development.js"></script>
13-
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.js"></script>
11+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.0.0/umd/react.development.js"></script>
12+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.0.0/umd/react-dom.development.js"></script>
13+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.js"></script>
1414
<script type="text/javascript" src="Sample.jsx"></script>
1515
<script type="text/javascript">
1616
ReactDOM.render(
@@ -19,4 +19,4 @@
1919
);
2020
</script>
2121
</body>
22-
</html>
22+
</html>
+12-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using Microsoft.AspNetCore.Mvc;
2-
3-
namespace React.Sample.Router.CoreMvc.Controllers
4-
{
5-
public class HomeController : Controller
6-
{
7-
public IActionResult Index()
8-
{
9-
return View();
10-
}
11-
}
12-
}
1+
using Microsoft.AspNetCore.Mvc;
2+
3+
namespace React.Sample.Router.CoreMvc.Controllers
4+
{
5+
public class HomeController : Controller
6+
{
7+
public IActionResult Index()
8+
{
9+
return View();
10+
}
11+
}
12+
}

Diff for: src/React.Sample.Router.CoreMvc/Program.cs

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
using Microsoft.AspNetCore;
2-
using Microsoft.AspNetCore.Hosting;
3-
4-
namespace React.Sample.Router.CoreMvc
5-
{
6-
public class Program
7-
{
8-
public static void Main(string[] args)
9-
{
10-
BuildWebHost(args).Run();
11-
}
12-
13-
public static IWebHost BuildWebHost(string[] args) =>
14-
WebHost.CreateDefaultBuilder(args)
15-
.UseStartup<Startup>()
16-
.Build();
17-
}
18-
}
1+
using Microsoft.AspNetCore;
2+
using Microsoft.AspNetCore.Hosting;
3+
4+
namespace React.Sample.Router.CoreMvc
5+
{
6+
public class Program
7+
{
8+
public static void Main(string[] args)
9+
{
10+
BuildWebHost(args).Run();
11+
}
12+
13+
public static IWebHost BuildWebHost(string[] args) =>
14+
WebHost.CreateDefaultBuilder(args)
15+
.UseStartup<Startup>()
16+
.Build();
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
{
2-
"iisSettings": {
3-
"windowsAuthentication": false,
4-
"anonymousAuthentication": true,
5-
"iisExpress": {
6-
"applicationUrl": "http://localhost:9456/",
7-
"sslPort": 0
8-
}
9-
},
10-
"profiles": {
11-
"IIS Express": {
12-
"commandName": "IISExpress",
13-
"launchBrowser": true,
14-
"launchUrl": "",
15-
"environmentVariables": {
16-
"ASPNETCORE_ENVIRONMENT": "Development"
17-
}
18-
},
19-
"React.Sample.Router.CoreMvc": {
20-
"commandName": "Project",
21-
"launchBrowser": true,
22-
"launchUrl": "",
23-
"environmentVariables": {
24-
"ASPNETCORE_ENVIRONMENT": "Development"
25-
},
26-
"applicationUrl": "http://localhost:9457/"
27-
}
28-
}
29-
}
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:9456/",
7+
"sslPort": 0
8+
}
9+
},
10+
"profiles": {
11+
"IIS Express": {
12+
"commandName": "IISExpress",
13+
"launchBrowser": true,
14+
"launchUrl": "",
15+
"environmentVariables": {
16+
"ASPNETCORE_ENVIRONMENT": "Development"
17+
}
18+
},
19+
"React.Sample.Router.CoreMvc": {
20+
"commandName": "Project",
21+
"launchBrowser": true,
22+
"launchUrl": "",
23+
"environmentVariables": {
24+
"ASPNETCORE_ENVIRONMENT": "Development"
25+
},
26+
"applicationUrl": "http://localhost:9457/"
27+
}
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
2-
<PropertyGroup>
3-
<TargetFramework>netcoreapp2.0</TargetFramework>
4-
</PropertyGroup>
5-
<ItemGroup>
6-
<Folder Include="wwwroot\" />
7-
</ItemGroup>
8-
<ItemGroup>
9-
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
10-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
11-
</ItemGroup>
12-
<ItemGroup>
13-
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
14-
</ItemGroup>
15-
<ItemGroup>
16-
<ProjectReference Include="..\React.AspNet.Middleware\React.AspNet.Middleware.csproj" />
17-
<ProjectReference Include="..\React.AspNet\React.AspNet.csproj" />
18-
<ProjectReference Include="..\React.Core\React.Core.csproj" />
19-
<ProjectReference Include="..\React.Router\React.Router.csproj" />
20-
</ItemGroup>
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
<PropertyGroup>
3+
<TargetFramework>netcoreapp2.0</TargetFramework>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<Folder Include="wwwroot\" />
7+
</ItemGroup>
8+
<ItemGroup>
9+
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
10+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.0.0" />
11+
</ItemGroup>
12+
<ItemGroup>
13+
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
14+
</ItemGroup>
15+
<ItemGroup>
16+
<ProjectReference Include="..\React.AspNet.Middleware\React.AspNet.Middleware.csproj" />
17+
<ProjectReference Include="..\React.AspNet\React.AspNet.csproj" />
18+
<ProjectReference Include="..\React.Core\React.Core.csproj" />
19+
<ProjectReference Include="..\React.Router\React.Router.csproj" />
20+
</ItemGroup>
2121
</Project>

Diff for: src/React.Sample.Router.CoreMvc/Startup.cs

+59-59
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
using System;
2-
using JavaScriptEngineSwitcher.Core;
3-
using JavaScriptEngineSwitcher.Msie;
4-
using Microsoft.AspNetCore.Builder;
5-
using Microsoft.AspNetCore.Hosting;
6-
using Microsoft.AspNetCore.Http;
7-
using Microsoft.Extensions.Configuration;
8-
using Microsoft.Extensions.DependencyInjection;
9-
using React.AspNet;
10-
11-
namespace React.Sample.Router.CoreMvc
12-
{
13-
public class Startup
14-
{
15-
public Startup(IConfiguration configuration)
16-
{
17-
Configuration = configuration;
18-
}
19-
20-
public IConfiguration Configuration { get; }
21-
22-
// This method gets called by the runtime. Use this method to add services to the container.
23-
public IServiceProvider ConfigureServices(IServiceCollection services)
24-
{
25-
services.AddMvc();
26-
services.AddReact();
27-
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
28-
29-
// Build the intermediate service provider then return it
30-
return services.BuildServiceProvider();
31-
}
32-
33-
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
34-
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
35-
{
36-
if (env.IsDevelopment())
37-
{
38-
app.UseDeveloperExceptionPage();
39-
}
40-
41-
app.UseStaticFiles();
42-
43-
// Initialise ReactJS.NET. Must be before static files.
44-
app.UseReact(config =>
45-
{
46-
config
47-
.SetReuseJavaScriptEngines(true)
48-
.SetLoadBabel(false)
49-
.SetLoadReact(false)
50-
.AddScriptWithoutTransform("~/components-bundle.generated.js");
51-
});
52-
53-
app.UseMvc(routes =>
54-
{
55-
routes.MapRoute("default", "{path?}", new { controller = "Home", action = "Index" });
56-
});
57-
}
58-
}
59-
}
1+
using System;
2+
using JavaScriptEngineSwitcher.Core;
3+
using JavaScriptEngineSwitcher.Msie;
4+
using Microsoft.AspNetCore.Builder;
5+
using Microsoft.AspNetCore.Hosting;
6+
using Microsoft.AspNetCore.Http;
7+
using Microsoft.Extensions.Configuration;
8+
using Microsoft.Extensions.DependencyInjection;
9+
using React.AspNet;
10+
11+
namespace React.Sample.Router.CoreMvc
12+
{
13+
public class Startup
14+
{
15+
public Startup(IConfiguration configuration)
16+
{
17+
Configuration = configuration;
18+
}
19+
20+
public IConfiguration Configuration { get; }
21+
22+
// This method gets called by the runtime. Use this method to add services to the container.
23+
public IServiceProvider ConfigureServices(IServiceCollection services)
24+
{
25+
services.AddMvc();
26+
services.AddReact();
27+
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
28+
29+
// Build the intermediate service provider then return it
30+
return services.BuildServiceProvider();
31+
}
32+
33+
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
34+
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
35+
{
36+
if (env.IsDevelopment())
37+
{
38+
app.UseDeveloperExceptionPage();
39+
}
40+
41+
app.UseStaticFiles();
42+
43+
// Initialise ReactJS.NET. Must be before static files.
44+
app.UseReact(config =>
45+
{
46+
config
47+
.SetReuseJavaScriptEngines(true)
48+
.SetLoadBabel(false)
49+
.SetLoadReact(false)
50+
.AddScriptWithoutTransform("~/components-bundle.generated.js");
51+
});
52+
53+
app.UseMvc(routes =>
54+
{
55+
routes.MapRoute("default", "{path?}", new { controller = "Home", action = "Index" });
56+
});
57+
}
58+
}
59+
}
+15-15
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
@using React.AspNet
2-
@using React.Router
3-
4-
<!DOCTYPE html>
5-
<html>
6-
<head>
7-
<title>React Router Sample</title>
8-
<meta charset="utf-8" />
9-
</head>
10-
<body>
11-
@Html.ReactRouterWithContext("RootComponent", new { })
12-
<script src="/components-bundle.generated.js"></script>
13-
@Html.ReactInitJavaScript()
14-
</body>
15-
</html>
1+
@using React.AspNet
2+
@using React.Router
3+
4+
<!DOCTYPE html>
5+
<html>
6+
<head>
7+
<title>React Router Sample</title>
8+
<meta charset="utf-8" />
9+
</head>
10+
<body>
11+
@Html.ReactRouterWithContext("RootComponent", new { })
12+
<script src="/components-bundle.generated.js"></script>
13+
@Html.ReactInitJavaScript()
14+
</body>
15+
</html>

0 commit comments

Comments
 (0)