diff --git a/.github/build.yml b/.github/build.yml deleted file mode 100644 index 91ae0d0..0000000 --- a/.github/build.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: build - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '6.0.x' - include-prerelease: true - - - name: Build with dotnet - run: dotnet build Foodie.sln --configuration Release diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a511ee5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: build + +on: pull_request + +jobs: + build-dotnet: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + include-prerelease: true + + - name: Build with dotnet + run: dotnet build Foodie.sln --configuration Release + + build-npm: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./Foodie/ClientApp + strategy: + matrix: + node-version: [18.x] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Run npm install + run: npm install + + - name: Run build command + run: npm run build diff --git a/Foodie/ClientApp/angular.json b/Foodie/ClientApp/angular.json index fc8b5a8..a6be8a1 100644 --- a/Foodie/ClientApp/angular.json +++ b/Foodie/ClientApp/angular.json @@ -14,7 +14,6 @@ "builder": "@angular-devkit/build-angular:browser", "options": { "progress": true, - "extractCss": true, "outputPath": "dist", "index": "src/index.html", "main": "src/main.ts", @@ -27,7 +26,7 @@ "styles": [ "src/custom-theme.scss", "node_modules/bootstrap/dist/css/bootstrap.min.css", - "src/styles.css" + "src/styles.scss" ], "scripts": [] }, @@ -147,6 +146,5 @@ } } } - }, - "defaultProject": "Foodie" -} \ No newline at end of file + } +} diff --git a/Foodie/ClientApp/src/app/app.module.ts b/Foodie/ClientApp/src/app/app.module.ts index f4fe802..4911453 100644 --- a/Foodie/ClientApp/src/app/app.module.ts +++ b/Foodie/ClientApp/src/app/app.module.ts @@ -22,7 +22,6 @@ import { MatAutocompleteModule } from '@angular/material/autocomplete'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatTooltipModule } from '@angular/material/tooltip'; import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { CountoModule } from 'angular2-counto'; import { DataComponent } from './data/data.component'; import * as Hammer from 'hammerjs'; import { StartingComponent } from './starting/starting.component'; @@ -87,7 +86,6 @@ export class MyHammerConfig extends HammerGestureConfig { MatProgressSpinnerModule, MatTooltipModule, MatProgressBarModule, - CountoModule, MatIconModule, MatChipsModule, MatRadioModule, @@ -96,11 +94,6 @@ export class MyHammerConfig extends HammerGestureConfig { MatSnackBarModule, MatButtonToggleModule ], - entryComponents: [ - IngriedientDialogComponent, - ProductDialogComponent, - MealsCountExceededSnackBarComponent - ], providers: [ { provide: HTTP_INTERCEPTORS, useClass: AuthorizeInterceptor, multi: true }, { provide: HAMMER_GESTURE_CONFIG, useClass: MyHammerConfig, }, diff --git a/Foodie/ClientApp/src/app/app.server.module.ts b/Foodie/ClientApp/src/app/app.server.module.ts index cfb0e02..316380b 100644 --- a/Foodie/ClientApp/src/app/app.server.module.ts +++ b/Foodie/ClientApp/src/app/app.server.module.ts @@ -1,11 +1,10 @@ import { NgModule } from '@angular/core'; import { ServerModule } from '@angular/platform-server'; -import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader'; import { AppComponent } from './app.component'; import { AppModule } from './app.module'; @NgModule({ - imports: [AppModule, ServerModule, ModuleMapLoaderModule], + imports: [AppModule, ServerModule], bootstrap: [AppComponent] }) export class AppServerModule { } diff --git a/Foodie/ClientApp/src/app/meal-calendar/meal-calendar.component.html b/Foodie/ClientApp/src/app/meal-calendar/meal-calendar.component.html index 14a3c2b..c25f9c0 100644 --- a/Foodie/ClientApp/src/app/meal-calendar/meal-calendar.component.html +++ b/Foodie/ClientApp/src/app/meal-calendar/meal-calendar.component.html @@ -116,12 +116,12 @@ - +
- listManage products - add Add new meal + listManage products + add Add new meal
-
+
diff --git a/Foodie/ClientApp/src/app/products/products.component.css b/Foodie/ClientApp/src/app/products/products.component.css index 0378ea1..56fb144 100644 --- a/Foodie/ClientApp/src/app/products/products.component.css +++ b/Foodie/ClientApp/src/app/products/products.component.css @@ -35,7 +35,7 @@ padding-right: 0; } -.mat-cell:last-of-type() { +.mat-cell:last-of-type { justify-content: end; } diff --git a/Foodie/ClientApp/src/app/products/products.component.html b/Foodie/ClientApp/src/app/products/products.component.html index d72f7d7..be1b25a 100644 --- a/Foodie/ClientApp/src/app/products/products.component.html +++ b/Foodie/ClientApp/src/app/products/products.component.html @@ -39,12 +39,12 @@

Products

- +
- calendar_todayManage meals - add Add new product + calendar_todayManage meals + add Add new product
-
+