Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dotnet8 angular18 #5

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Install template
run: dotnet new --install .
- name: Create output folder
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.words": [
"Hsts"
]
}
4 changes: 2 additions & 2 deletions F23.SpaTemplates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<PackageType>Template</PackageType>
<PackageVersion>1.0.3</PackageVersion>
<PackageVersion>2.0.0</PackageVersion>
<PackageId>F23.SpaTemplates</PackageId>
<Title>feature[23] ASP.NET Core SPA Templates</Title>
<Authors>feature[23]</Authors>
<Description>Templates for creating ASP.NET Core Single-Page-App web applications with Angular.</Description>
<PackageTags>dotnet-new;templates;feature23</PackageTags>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<NoDefaultExcludes>true</NoDefaultExcludes>
<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 feature[23]
Copyright (c) 2024 feature[23]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ dotnet new --install F23.SpaTemplates

### f23-angular-material

This template is a minimal ASP.NET Core 6 app with Angular v16 and Angular Material.
This template is a minimal ASP.NET Core 8 app with Angular v18 and Angular Material.

How does this compare to the `dotnet new angular` template in .NET 6?
How does this compare to the `dotnet new angular` template in .NET 8?

| `dotnet new angular` | `dotnet new f23-angular-material` |
| --- | --- |
| ❌ Slow inner-loop dev experience with the proxy and HTTPS cert startup code | ✅ Fast inner-loop with separate processes for ASP.NET and `npm start` (see README in generated project) |
| ❌ Angular proxy code does not match how it's usually used when deployed to production | ✅ Closer match to production |
| ❌ Does an `npm install` on launch | ✅ Faster launch by letting you run `npm i` only when needed |
| ❌ Angular v12 | ✅ Angular v16 |
| ❌ Angular v14 | ✅ Angular v18 |
| ❌ Uses Bootstrap with jQuery | ✅ Angular Material included, no jQuery |
| ❌ Uses CSS for stylesheets | ✅ Uses SCSS for stylesheets |
| ❌ Adds SQLite and migrations (with identity option) | ✅ Only minimal default code, you're free to add your own database/identity/etc |
Expand Down
2 changes: 1 addition & 1 deletion templates/angular-material/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json.schemastore.org/template",
"author": "Paul Irwin",
"classifications": ["Web"],
"name": "ASP.NET Core 6 with Angular + Material",
"name": "ASP.NET Core 8 with Angular + Material",
"shortName": "f23-angular-material",
"defaultName": "AngularMaterialWebApp",
"identity": "F23.SpaTemplates.AngularMaterial",
Expand Down
4 changes: 2 additions & 2 deletions templates/angular-material/AngularMaterialWebApp.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<SpaRoot>ClientApp\</SpaRoot>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.16" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.6" />
</ItemGroup>

<ItemGroup>
Expand Down
25 changes: 14 additions & 11 deletions templates/angular-material/ClientApp/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/",
"outputPath": {
"base": "dist/"
},
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"src/polyfills.ts"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
Expand All @@ -31,7 +34,8 @@
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
"src/styles.scss"
],
"scripts": []
"scripts": [],
"browser": "src/main.ts"
},
"configurations": {
"production": {
Expand All @@ -56,9 +60,7 @@
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
Expand All @@ -70,18 +72,18 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "angularmaterialwebapp:build:production"
"buildTarget": "angularmaterialwebapp:build:production"
},
"development": {
"browserTarget": "angularmaterialwebapp:build:development"
"buildTarget": "angularmaterialwebapp:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "angularmaterialwebapp:build"
"buildTarget": "angularmaterialwebapp:build"
}
},
"test": {
Expand Down Expand Up @@ -118,7 +120,8 @@
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
]
],
"analytics": false
},
"schematics": {
"@schematics/angular:component": {
Expand Down
Loading
Loading