Skip to content

Commit af60b64

Browse files
authored
Merge pull request #125 from haacked/haacked/ignore-solution
Move sample project into an npm ignored folder
2 parents 343408d + a37fa01 commit af60b64

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+4648
-1510
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.vscode/
2+
sample/
23
src/
34
.gitattributes
45
.travis.yml

package-lock.json

Lines changed: 54 additions & 1186 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
2-
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.0.31903.59
5-
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoWeb", "DemoWeb.csproj", "{F4915022-634C-440E-8F1D-5CF2CA48108F}"
7-
EndProject
8-
Global
9-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10-
Debug|Any CPU = Debug|Any CPU
11-
Release|Any CPU = Release|Any CPU
12-
EndGlobalSection
13-
GlobalSection(SolutionProperties) = preSolution
14-
HideSolutionNode = FALSE
15-
EndGlobalSection
16-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
17-
{F4915022-634C-440E-8F1D-5CF2CA48108F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18-
{F4915022-634C-440E-8F1D-5CF2CA48108F}.Debug|Any CPU.Build.0 = Debug|Any CPU
19-
{F4915022-634C-440E-8F1D-5CF2CA48108F}.Release|Any CPU.ActiveCfg = Release|Any CPU
20-
{F4915022-634C-440E-8F1D-5CF2CA48108F}.Release|Any CPU.Build.0 = Release|Any CPU
21-
EndGlobalSection
22-
EndGlobal
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoWeb", "DemoWeb.csproj", "{F4915022-634C-440E-8F1D-5CF2CA48108F}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(SolutionProperties) = preSolution
14+
HideSolutionNode = FALSE
15+
EndGlobalSection
16+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
17+
{F4915022-634C-440E-8F1D-5CF2CA48108F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18+
{F4915022-634C-440E-8F1D-5CF2CA48108F}.Debug|Any CPU.Build.0 = Debug|Any CPU
19+
{F4915022-634C-440E-8F1D-5CF2CA48108F}.Release|Any CPU.ActiveCfg = Release|Any CPU
20+
{F4915022-634C-440E-8F1D-5CF2CA48108F}.Release|Any CPU.Build.0 = Release|Any CPU
21+
EndGlobalSection
22+
EndGlobal
File renamed without changes.
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web" InitialTargets="CopyFiles">
2-
3-
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
7-
<ImplicitUsings>enable</ImplicitUsings>
8-
</PropertyGroup>
9-
10-
<Target Name="CopyFiles">
11-
<Exec Command="npm run build" />
12-
13-
<ItemGroup>
14-
<!-- Because this ItemGroup is inside the target, this will enumerate
15-
all files just before calling Copy. If the ItemGroup were outside
16-
the target , it would enumerate the files during evaluation, before
17-
the build starts, which may miss files created during the build. -->
18-
<MySourceFiles Include="dist\*.*" />
19-
<Copy SourceFiles="@(MySourceFiles)" DestinationFiles="wwwroot\dist\%(RecursiveDir)%(Filename)%(Extension)" />
20-
</ItemGroup>
21-
22-
<Copy SourceFiles="@(MySourceFiles)" DestinationFiles="wwwroot\dist\%(RecursiveDir)%(Filename)%(Extension)" />
23-
</Target>
24-
25-
26-
</Project>
1+
<Project Sdk="Microsoft.NET.Sdk.Web" InitialTargets="CopyFiles">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
</PropertyGroup>
9+
10+
<Target Name="CopyFiles">
11+
<Exec Command="npm run build" />
12+
13+
<ItemGroup>
14+
<!-- Because this ItemGroup is inside the target, this will enumerate
15+
all files just before calling Copy. If the ItemGroup were outside
16+
the target , it would enumerate the files during evaluation, before
17+
the build starts, which may miss files created during the build. -->
18+
<MySourceFiles Include="..\dist\*.*" />
19+
<Copy SourceFiles="@(MySourceFiles)" DestinationFiles="wwwroot\dist\%(RecursiveDir)%(Filename)%(Extension)" />
20+
</ItemGroup>
21+
22+
<Copy SourceFiles="@(MySourceFiles)" DestinationFiles="wwwroot\dist\%(RecursiveDir)%(Filename)%(Extension)" />
23+
</Target>
24+
25+
26+
</Project>
File renamed without changes.
File renamed without changes.
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
@page
2-
@model DemoWeb.Pages.ErrorModel
3-
@{
4-
ViewData["Title"] = "Error";
5-
}
6-
7-
<h1 class="text-danger">Error.</h1>
8-
<h2 class="text-danger">An error occurred while processing your request.</h2>
9-
10-
@if (Model.ShowRequestId)
11-
{
12-
<p>
13-
<strong>Request ID:</strong> <code>@Model.RequestId</code>
14-
</p>
15-
}
16-
17-
<h3>Development Mode</h3>
18-
<p>
19-
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
20-
</p>
21-
<p>
22-
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
23-
It can result in displaying sensitive information from exceptions to end users.
24-
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
25-
and restarting the app.
26-
</p>
1+
@page
2+
@model DemoWeb.Pages.ErrorModel
3+
@{
4+
ViewData["Title"] = "Error";
5+
}
6+
7+
<h1 class="text-danger">Error.</h1>
8+
<h2 class="text-danger">An error occurred while processing your request.</h2>
9+
10+
@if (Model.ShowRequestId)
11+
{
12+
<p>
13+
<strong>Request ID:</strong> <code>@Model.RequestId</code>
14+
</p>
15+
}
16+
17+
<h3>Development Mode</h3>
18+
<p>
19+
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
20+
</p>
21+
<p>
22+
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
23+
It can result in displaying sensitive information from exceptions to end users.
24+
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
25+
and restarting the app.
26+
</p>
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
using System.Diagnostics;
2-
using Microsoft.AspNetCore.Mvc;
3-
using Microsoft.AspNetCore.Mvc.RazorPages;
4-
5-
namespace DemoWeb.Pages;
6-
7-
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
8-
[IgnoreAntiforgeryToken]
9-
public class ErrorModel : PageModel
10-
{
11-
public string? RequestId { get; set; }
12-
13-
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
14-
15-
private readonly ILogger<ErrorModel> _logger;
16-
17-
public ErrorModel(ILogger<ErrorModel> logger)
18-
{
19-
_logger = logger;
20-
}
21-
22-
public void OnGet()
23-
{
24-
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
25-
}
26-
}
27-
1+
using System.Diagnostics;
2+
using Microsoft.AspNetCore.Mvc;
3+
using Microsoft.AspNetCore.Mvc.RazorPages;
4+
5+
namespace DemoWeb.Pages;
6+
7+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
8+
[IgnoreAntiforgeryToken]
9+
public class ErrorModel : PageModel
10+
{
11+
public string? RequestId { get; set; }
12+
13+
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
14+
15+
private readonly ILogger<ErrorModel> _logger;
16+
17+
public ErrorModel(ILogger<ErrorModel> logger)
18+
{
19+
_logger = logger;
20+
}
21+
22+
public void OnGet()
23+
{
24+
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
25+
}
26+
}
27+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
var builder = WebApplication.CreateBuilder(args);
2-
3-
// Add services to the container.
4-
builder.Services.AddRazorPages();
5-
6-
var app = builder.Build();
7-
8-
// Configure the HTTP request pipeline.
9-
if (!app.Environment.IsDevelopment())
10-
{
11-
app.UseExceptionHandler("/Error");
12-
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
13-
app.UseHsts();
14-
}
15-
16-
app.UseHttpsRedirection();
17-
app.UseStaticFiles();
18-
19-
app.UseRouting();
20-
app.UseAuthorization();
21-
22-
app.MapRazorPages();
23-
24-
app.MapControllerRoute(
25-
name: "default",
26-
pattern: "{controller=Home}/{action=Index}/{id?}");
27-
28-
app.Run();
1+
var builder = WebApplication.CreateBuilder(args);
2+
3+
// Add services to the container.
4+
builder.Services.AddRazorPages();
5+
6+
var app = builder.Build();
7+
8+
// Configure the HTTP request pipeline.
9+
if (!app.Environment.IsDevelopment())
10+
{
11+
app.UseExceptionHandler("/Error");
12+
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
13+
app.UseHsts();
14+
}
15+
16+
app.UseHttpsRedirection();
17+
app.UseStaticFiles();
18+
19+
app.UseRouting();
20+
app.UseAuthorization();
21+
22+
app.MapRazorPages();
23+
24+
app.MapControllerRoute(
25+
name: "default",
26+
pattern: "{controller=Home}/{action=Index}/{id?}");
27+
28+
app.Run();
Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
{
2-
"iisSettings": {
3-
"windowsAuthentication": false,
4-
"anonymousAuthentication": true,
5-
"iisExpress": {
6-
"applicationUrl": "http://localhost:19376",
7-
"sslPort": 44333
8-
}
9-
},
10-
"profiles": {
11-
"http": {
12-
"commandName": "Project",
13-
"dotnetRunMessages": true,
14-
"launchBrowser": true,
15-
"applicationUrl": "http://localhost:5045",
16-
"environmentVariables": {
17-
"ASPNETCORE_ENVIRONMENT": "Development"
18-
}
19-
},
20-
"https": {
21-
"commandName": "Project",
22-
"dotnetRunMessages": true,
23-
"launchBrowser": true,
24-
"applicationUrl": "https://localhost:7109;http://localhost:5045",
25-
"environmentVariables": {
26-
"ASPNETCORE_ENVIRONMENT": "Development"
27-
}
28-
},
29-
"IIS Express": {
30-
"commandName": "IISExpress",
31-
"launchBrowser": true,
32-
"environmentVariables": {
33-
"ASPNETCORE_ENVIRONMENT": "Development"
34-
}
35-
}
36-
}
37-
}
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "http://localhost:19376",
7+
"sslPort": 44333
8+
}
9+
},
10+
"profiles": {
11+
"http": {
12+
"commandName": "Project",
13+
"dotnetRunMessages": true,
14+
"launchBrowser": true,
15+
"applicationUrl": "http://localhost:5045",
16+
"environmentVariables": {
17+
"ASPNETCORE_ENVIRONMENT": "Development"
18+
}
19+
},
20+
"https": {
21+
"commandName": "Project",
22+
"dotnetRunMessages": true,
23+
"launchBrowser": true,
24+
"applicationUrl": "https://localhost:7109;http://localhost:5045",
25+
"environmentVariables": {
26+
"ASPNETCORE_ENVIRONMENT": "Development"
27+
}
28+
},
29+
"IIS Express": {
30+
"commandName": "IISExpress",
31+
"launchBrowser": true,
32+
"environmentVariables": {
33+
"ASPNETCORE_ENVIRONMENT": "Development"
34+
}
35+
}
36+
}
37+
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{
2-
"DetailedErrors": true,
3-
"Logging": {
4-
"LogLevel": {
5-
"Default": "Information",
6-
"Microsoft.AspNetCore": "Warning"
7-
}
8-
}
9-
}
1+
{
2+
"DetailedErrors": true,
3+
"Logging": {
4+
"LogLevel": {
5+
"Default": "Information",
6+
"Microsoft.AspNetCore": "Warning"
7+
}
8+
}
9+
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{
2-
"Logging": {
3-
"LogLevel": {
4-
"Default": "Information",
5-
"Microsoft.AspNetCore": "Warning"
6-
}
7-
},
8-
"AllowedHosts": "*"
9-
}
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
},
8+
"AllowedHosts": "*"
9+
}

0 commit comments

Comments
 (0)