Added readme file, changed build config a bit

This commit is contained in:
schnulller
2022-06-11 14:54:15 +02:00
parent 02ebc74f22
commit b50c9ac320
7 changed files with 90 additions and 4044 deletions

View File

@@ -7,12 +7,14 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<!-- <Content Remove="wwwroot\css\site.css" />
<Content Include="wwwroot\css\site.css" Watch="false" /> -->
</ItemGroup>
<Target Name="Tailwind" BeforeTargets="Build">
<ItemGroup>
<Content Remove="wwwroot\css\*.css" />
<Content Include="wwwroot\css\*.css" Watch="false" />
<Content Remove="wwwroot\css\output.css" />
<Content Include="wwwroot\css\output.css" Watch="true" />
</ItemGroup>
<Target Name="Tailwind" >
<Exec Command="npm run css_build" />
</Target>

View File

@@ -1,3 +1,34 @@
# Building and preparation
## Prep
Install nodejs > 16.5 LTS. Install npm > 8.10.0. After that, do an `npm install` in the home directory to install the neccessary dependencies.
Nodejs is used for css scaffolding, this project uses `postcss`, with the `tailwindcss` CSS framework as a postcss plugin to only include used and neccessary classes. Also, the `postcss-import` postcss-plugin is used to allow for compartmntalization of css files and the import statement to merge those files together (be careful of the order of commands in postcss.config.js!). `autoprefixer` and `css-nano` plugins are important at least for production build since they provide cross-browser-compatibility and minification of file size for css files.
Dotnet 6.0.300 is currently used. To build the project, do a `dotnet restore` and collect the `Microsoft.FeatureManagement.AspNetCore` nuget-package which is used to enable feauture-flags in `appsettings.json`. Some routes, such as the admin area of the project will only be mapped if certain flags are set to true.
## Building the project
`dotnet build Tailwind.csproj` or `npm run css_build`
to build the neccessary `output.css`-File.
`dotnet build HaWeb.csproj`
to build the App. Please do consider the order of these commands.
## Development tools
Run
`dotnet watch --project Tailwind.csproj build -- Tailwind.csproj` and
`dotnet watch --project HaWeb.csproj -- run --project HaWeb.csproj`
in two terminal windows to watych for specific file changes in .css / .js / .cshtml / .json / .cs files and to rebuild the css-Files and the app automatically on change.
Recommended vscode plugins include the XML Tools, Prettier, c#, Nuget Gallery, Tailwind CSS IntelliSense & TODO Tree.
# Redesign der Hamann-Vebseite, drittes Major Upadte
Veränderungenen in der Funktionalität für den Benutzer
- Behutsames Redesign der Webseite:

30
HaWeb/Tailwind.csproj Normal file
View File

@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk.Web" DefaultTargets="Tailwind">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<EnablePreviewFeatures>True</EnablePreviewFeatures>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Content Remove="wwwroot\css\output.css" />
<Content Include="wwwroot\css\output.css" Watch="false" />
<Content Remove="**\*.cs" />
<Content Include="**\*.cs" Watch="false" />
<Content Remove="Settings\CSSClassesSettings.cs" />
<Content Include="Settings\CSSClassesSettings.cs" Watch="true" />
</ItemGroup>
<Target Name="Tailwind" BeforeTargets="Build">
<Exec Command="npm run css_build" />
</Target>
<ItemGroup>
<ProjectReference Include="..\HaXMLReaderV6\HaXMLReaderV6.csproj" />
<ProjectReference Include="..\HaDocumentV6\HaDocumentV6.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.FeatureManagement.AspNetCore" Version="2.5.1" />
</ItemGroup>
</Project>

View File

@@ -346,9 +346,9 @@
}
},
"node_modules/css-declaration-sorter": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.2.2.tgz",
"integrity": "sha512-Ufadglr88ZLsrvS11gjeu/40Lw74D9Am/Jpr3LlYm5Q4ZP5KdlUhG+6u2EjyXeZcxmZ2h1ebCKngDjolpeLHpg==",
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.0.tgz",
"integrity": "sha512-OGT677UGHJTAVMRhPO+HJ4oKln3wkBTwtDFH0ojbqm+MJm6xuDMHp2nkhh/ThaBqq20IbraBQSWKfSLNHQO9Og==",
"dev": true,
"engines": {
"node": "^10 || ^12 || >=14"
@@ -610,9 +610,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.4.150",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.150.tgz",
"integrity": "sha512-MP3oBer0X7ZeS9GJ0H6lmkn561UxiwOIY9TTkdxVY7lI9G6GVCKfgJaHaDcakwdKxBXA4T3ybeswH/WBIN/KTA==",
"version": "1.4.151",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.151.tgz",
"integrity": "sha512-XaG2LpZi9fdiWYOqJh0dJy4SlVywCvpgYXhzOlZTp4JqSKqxn5URqOjbm9OMYB3aInA2GuHQiem1QUOc1yT0Pw==",
"dev": true
},
"node_modules/emoji-regex": {
@@ -1858,9 +1858,9 @@
}
},
"node_modules/tailwindcss": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.0.tgz",
"integrity": "sha512-XzXq31Fj6RizhlFVNLBlDqzs0dXuIEOAknuOcKx2R/IIQbEz5DnngslYY4JNN6e9JkNBjHGm1w2XDABsADg1ng==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.1.tgz",
"integrity": "sha512-F5VFj5FiS4QZqdXPE6T6RJFqbsmISQ2KBUp9bOQyws9TleGToHsa54X8kwXwVdHMQhNeXOlxI47lrRICEVuOvg==",
"dev": true,
"dependencies": {
"arg": "^5.0.1",
@@ -2234,9 +2234,9 @@
"dev": true
},
"css-declaration-sorter": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.2.2.tgz",
"integrity": "sha512-Ufadglr88ZLsrvS11gjeu/40Lw74D9Am/Jpr3LlYm5Q4ZP5KdlUhG+6u2EjyXeZcxmZ2h1ebCKngDjolpeLHpg==",
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.0.tgz",
"integrity": "sha512-OGT677UGHJTAVMRhPO+HJ4oKln3wkBTwtDFH0ojbqm+MJm6xuDMHp2nkhh/ThaBqq20IbraBQSWKfSLNHQO9Og==",
"dev": true,
"requires": {}
},
@@ -2421,9 +2421,9 @@
}
},
"electron-to-chromium": {
"version": "1.4.150",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.150.tgz",
"integrity": "sha512-MP3oBer0X7ZeS9GJ0H6lmkn561UxiwOIY9TTkdxVY7lI9G6GVCKfgJaHaDcakwdKxBXA4T3ybeswH/WBIN/KTA==",
"version": "1.4.151",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.151.tgz",
"integrity": "sha512-XaG2LpZi9fdiWYOqJh0dJy4SlVywCvpgYXhzOlZTp4JqSKqxn5URqOjbm9OMYB3aInA2GuHQiem1QUOc1yT0Pw==",
"dev": true
},
"emoji-regex": {
@@ -3228,9 +3228,9 @@
}
},
"tailwindcss": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.0.tgz",
"integrity": "sha512-XzXq31Fj6RizhlFVNLBlDqzs0dXuIEOAknuOcKx2R/IIQbEz5DnngslYY4JNN6e9JkNBjHGm1w2XDABsADg1ng==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.1.1.tgz",
"integrity": "sha512-F5VFj5FiS4QZqdXPE6T6RJFqbsmISQ2KBUp9bOQyws9TleGToHsa54X8kwXwVdHMQhNeXOlxI47lrRICEVuOvg==",
"dev": true,
"requires": {
"arg": "^5.0.1",

View File

@@ -3,7 +3,7 @@ module.exports = {
require('postcss-import'),
require('tailwindcss'),
// Production:
// require('autoprefixer'),
// require('cssnano')({ preset: 'default' })
require('autoprefixer'),
require('cssnano')({ preset: 'default' })
],
}

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +0,0 @@
@layer components {
/* COLORS */
/* STYLES */
}