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

ci: add npm install #43

Merged
merged 27 commits into from
Jan 26, 2024
Merged
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
18 changes: 0 additions & 18 deletions .github/build.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 3 additions & 5 deletions Foodie/ClientApp/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -27,7 +26,7 @@
"styles": [
"src/custom-theme.scss",
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
"src/styles.scss"
],
"scripts": []
},
Expand Down Expand Up @@ -147,6 +146,5 @@
}
}
}
},
"defaultProject": "Foodie"
}
}
}
7 changes: 0 additions & 7 deletions Foodie/ClientApp/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -87,7 +86,6 @@ export class MyHammerConfig extends HammerGestureConfig {
MatProgressSpinnerModule,
MatTooltipModule,
MatProgressBarModule,
CountoModule,
MatIconModule,
MatChipsModule,
MatRadioModule,
Expand All @@ -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, },
Expand Down
3 changes: 1 addition & 2 deletions Foodie/ClientApp/src/app/app.server.module.ts
Original file line number Diff line number Diff line change
@@ -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 { }
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@
</mat-accordion>
</div>
</div>
<mat-chip-list class="d-none d-lg-inline">
<mat-chip-listbox class="d-none d-lg-inline">
<div class="floating-buttons">
<mat-chip class="floating-button-large" [routerLink]='["/products"]' disableRipple><i class=" material-icons ">list</i>Manage products</mat-chip>
<mat-chip class="floating-button-large" (click)="addMeal()" disableRipple><i class=" material-icons ">add</i> Add new meal </mat-chip>
<mat-chip-option class="floating-button-large" [routerLink]='["/products"]' disableRipple><i class=" material-icons ">list</i>Manage products</mat-chip-option>
<mat-chip-option class="floating-button-large" (click)="addMeal()" disableRipple><i class=" material-icons ">add</i> Add new meal </mat-chip-option>
</div>
</mat-chip-list>
</mat-chip-listbox>

<div class="floating-buttons">
<button mat-fab class=" floating-button d-inline d-lg-none " [routerLink]='["/products"]'><i class="material-icons ">list</i></button>
Expand Down
2 changes: 1 addition & 1 deletion Foodie/ClientApp/src/app/products/products.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
padding-right: 0;
}

.mat-cell:last-of-type() {
.mat-cell:last-of-type {
justify-content: end;
}

Expand Down
8 changes: 4 additions & 4 deletions Foodie/ClientApp/src/app/products/products.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ <h1 class="text-center mb-3">Products</h1>
</mat-table>

</div>
<mat-chip-list class="d-none d-lg-inline">
<mat-chip-listbox class="d-none d-lg-inline">
<div class="floating-buttons">
<mat-chip class="floating-button-large" [routerLink]='["/mealcalendar"]'><i class=" material-icons ">calendar_today</i>Manage meals</mat-chip>
<mat-chip class="floating-button-large" (click)="addProduct()"><i class=" material-icons ">add</i> Add new product </mat-chip>
<mat-chip-option class="floating-button-large" [routerLink]='["/mealcalendar"]'><i class=" material-icons ">calendar_today</i>Manage meals</mat-chip-option>
<mat-chip-option class="floating-button-large" (click)="addProduct()"><i class=" material-icons ">add</i> Add new product </mat-chip-option>
</div>
</mat-chip-list>
</mat-chip-listbox>

<div class="floating-buttons">
<button mat-fab class=" floating-button d-inline d-lg-none " [routerLink]='["/mealcalendar"]'><i
Expand Down
1 change: 0 additions & 1 deletion Foodie/ClientApp/src/app/services/meals.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Meal } from '../models/meal';
import { DatePipe } from '@angular/common';
import { debug } from 'util';
import { Ingriedient } from '../models/ingiedient';
import { Macro } from '../models/macro';

Expand Down
36 changes: 15 additions & 21 deletions Foodie/ClientApp/src/custom-theme.scss
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@

// Custom Theming for Angular Material
// For more information: https://material.angular.io/guide/theming
@import '~@angular/material/theming';
// Plus imports for other components in your app.
@use '@angular/material' as mat;

// Include the common styles for Angular Material. We include this here so that you only
// have to load a single css file for Angular Material in your app.
// Be sure that you only ever include this mixin once!
@include mat-core();
@include mat.core();
@include mat.strong-focus-indicators();

// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue. Available color palettes: https://material.io/design/color/
$Foodie-primary: mat-palette($mat-indigo);
$Foodie-accent: mat-palette($mat-pink, A200, A100, A400);
$Foodie-primary: mat.define-palette(mat.$indigo-palette, 500);
$Foodie-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
$Foodie-warn: mat.define-palette(mat.$red-palette);

// The warn palette is optional (defaults to red).
$Foodie-warn: mat-palette($mat-red);

// Create the theme object (a Sass map containing all of the palettes).
$Foodie-theme: mat-light-theme($Foodie-primary, $Foodie-accent, $Foodie-warn);

// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include angular-material-theme($Foodie-theme);
$Foodie-theme: mat.define-light-theme((
color: (
primary: $Foodie-primary,
accent: $Foodie-accent,
warn: $Foodie-warn,
)
));

@include mat.all-component-themes($Foodie-theme);
@include mat.strong-focus-indicators-theme($Foodie-theme);
5 changes: 3 additions & 2 deletions Foodie/ClientApp/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.

// import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js';
import 'zone.js/testing';

/***************************************************************************************************
* APPLICATION IMPORTS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ body {
button:focus,
button:active:focus,
button.active:focus {
outline: none !important;
outline: none !important;
outline-style: none !important;
}

Expand Down
Loading