mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-24 02:30:13 +00:00
Normalise trailing whitespace and line endings everywhere
This commit is contained in:
@@ -9,19 +9,19 @@ export class Counter extends React.Component<any, CounterState> {
|
||||
super();
|
||||
this.state = { currentCount: 0 };
|
||||
}
|
||||
|
||||
|
||||
public render() {
|
||||
return <div>
|
||||
<h1>Counter</h1>
|
||||
|
||||
|
||||
<p>This is a simple example of a React component.</p>
|
||||
|
||||
<p>Current count: <strong>{ this.state.currentCount }</strong></p>
|
||||
|
||||
|
||||
<button onClick={ () => { this.incrementCounter() } }>Increment</button>
|
||||
</div>;
|
||||
}
|
||||
|
||||
|
||||
incrementCounter() {
|
||||
this.setState({
|
||||
currentCount: this.state.currentCount + 1
|
||||
|
||||
@@ -7,7 +7,7 @@ interface FetchDataExampleState {
|
||||
|
||||
export class FetchData extends React.Component<any, FetchDataExampleState> {
|
||||
constructor() {
|
||||
super();
|
||||
super();
|
||||
this.state = { forecasts: [], loading: true };
|
||||
|
||||
fetch('/api/SampleData/WeatherForecasts')
|
||||
@@ -21,7 +21,7 @@ export class FetchData extends React.Component<any, FetchDataExampleState> {
|
||||
let contents = this.state.loading
|
||||
? <p><em>Loading...</em></p>
|
||||
: FetchData.renderForecastsTable(this.state.forecasts);
|
||||
|
||||
|
||||
return <div>
|
||||
<h1>Weather forecast</h1>
|
||||
<p>This component demonstrates fetching data from the server.</p>
|
||||
|
||||
@@ -7,7 +7,7 @@ export class Home extends React.Component<any, void> {
|
||||
<p>Welcome to your new single-page application, built with:</p>
|
||||
<ul>
|
||||
<li><a href='https://get.asp.net/'>ASP.NET Core</a> and <a href='https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx'>C#</a> for cross-platform server-side code</li>
|
||||
<li><a href='https://facebook.github.io/react/'>React</a> and <a href='http://www.typescriptlang.org/'>TypeScript</a> for client-side code</li>
|
||||
<li><a href='https://facebook.github.io/react/'>React</a> and <a href='http://www.typescriptlang.org/'>TypeScript</a> for client-side code</li>
|
||||
<li><a href='https://webpack.github.io/'>Webpack</a> for building and bundling client-side resources</li>
|
||||
<li><a href='http://getbootstrap.com/'>Bootstrap</a> for layout and styling</li>
|
||||
</ul>
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface LayoutProps {
|
||||
|
||||
export class Layout extends React.Component<LayoutProps, void> {
|
||||
public render() {
|
||||
return <div className='container-fluid'>
|
||||
return <div className='container-fluid'>
|
||||
<div className='row'>
|
||||
<div className='col-sm-3'>
|
||||
<NavMenu />
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Link } from 'react-router';
|
||||
|
||||
export class NavMenu extends React.Component<any, void> {
|
||||
public render() {
|
||||
return <div className='main-nav'>
|
||||
return <div className='main-nav'>
|
||||
<div className='navbar navbar-inverse'>
|
||||
<div className='navbar-header'>
|
||||
<button type='button' className='navbar-toggle' data-toggle='collapse' data-target='.navbar-collapse'>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
/* Keep the nav menu independent of scrolling and on top of other items */
|
||||
.main-nav {
|
||||
position: fixed;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace WebApplicationBasic.Controllers
|
||||
{
|
||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
|
||||
[HttpGet, Route("[action]")]
|
||||
public IEnumerable<WeatherForecast> WeatherForecasts()
|
||||
{
|
||||
@@ -25,13 +25,13 @@ namespace WebApplicationBasic.Controllers
|
||||
Summary = Summaries[rng.Next(Summaries.Length)]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public class WeatherForecast
|
||||
{
|
||||
public string DateFormatted { get; set; }
|
||||
public int TemperatureC { get; set; }
|
||||
public string Summary { get; set; }
|
||||
|
||||
|
||||
public int TemperatureF
|
||||
{
|
||||
get
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace WebApplicationBasic
|
||||
}
|
||||
|
||||
app.UseIISPlatformHandler();
|
||||
|
||||
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions
|
||||
@@ -68,7 +68,7 @@ namespace WebApplicationBasic
|
||||
routes.MapRoute(
|
||||
name: "default",
|
||||
template: "{controller=Home}/{action=Index}/{id?}");
|
||||
|
||||
|
||||
routes.MapSpaFallbackRoute(
|
||||
name: "spa-fallback",
|
||||
defaults: new { controller = "Home", action = "Index" });
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
@using WebApplicationBasic
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
@addTagHelper "*, Microsoft.AspNet.SpaServices"
|
||||
@using WebApplicationBasic
|
||||
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
|
||||
@addTagHelper "*, Microsoft.AspNet.SpaServices"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ module.exports = {
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
extractCSS,
|
||||
extractCSS,
|
||||
new webpack.optimize.UglifyJsPlugin({ minimize: true })
|
||||
]
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
|
||||
</handlers>
|
||||
<httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false"/>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
|
||||
</handlers>
|
||||
<httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false"/>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
|
||||
Reference in New Issue
Block a user