Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.

Commit

Permalink
fix(development): create npm run serve:demo, fix for icons
Browse files Browse the repository at this point in the history
  • Loading branch information
thomastoye committed Jun 29, 2019
1 parent 2db6e6c commit 7936390
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@ Include the theme (in your global `styles.scss`):
@include hoepel-angular-common-theme($theme); // where $theme is your Angular Material theme
```

## Development

(see development brief)

```
npm run serve:demo
```

3 changes: 2 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
"assets": [
"projects/ng-hoepel-common-demo/src/favicon.ico",
"projects/ng-hoepel-common-demo/src/assets",
{ "glob": "mdi.svg", "input": "../node_modules/@mdi/angular-material", "output": "./assets" }
{ "glob": "mdi.svg", "input": "../node_modules/@mdi/angular-material", "output": "./assets" },
{ "glob": "mdi.svg", "input": "node_modules/@mdi/angular-material", "output": "./assets" }
],
"styles": [
"projects/ng-hoepel-common-demo/src/styles.scss"
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"copy:readme": "copyfiles ./README.md ./dist/ng-hoepel-common",
"build:lib": "ng build ng-hoepel-common",
"build:demo": "ng build ng-hoepel-common-demo --base-href='https://hoepel-app.github.io/angular-common/'",
"build:demo:local": "ng build ng-hoepel-common-demo",
"serve:demo": "ng serve ng-hoepel-common-demo",
"publish:demo": "npx angular-cli-ghpages --dir=./dist/ng-hoepel-common",
"publish:lib": "npm run copy:readme && npx semantic-release",
"adjust-version": "npm-run-all adjust-version:*",
Expand Down
10 changes: 9 additions & 1 deletion projects/ng-hoepel-common-demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import { Component } from '@angular/core';
import { Tenant } from '@hoepel.app/types';
import { MatIconRegistry } from '@angular/material';
import { DomSanitizer } from '@angular/platform-browser';
import { HttpClient } from '@angular/common/http';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {}
export class AppComponent {
constructor(matIconRegistry: MatIconRegistry, domSanitizer: DomSanitizer, http: HttpClient) {
console.log(http);
matIconRegistry.addSvgIconSet(domSanitizer.bypassSecurityTrustResourceUrl('./assets/mdi.svg'));
}
}
16 changes: 10 additions & 6 deletions projects/ng-hoepel-common-demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MatCardModule, MatIconRegistry } from '@angular/material';
import { DiscountEditExampleComponent } from './discount-edit-example/discount-edit-example.component';
import { DiscountEditModule } from '../../../ng-hoepel-common/src/lib/discount-edit';
import { HttpClientModule } from '@angular/common/http';

@NgModule({
declarations: [AppComponent, TenantContactExampleComponent, DiscountEditExampleComponent],
imports: [BrowserModule, TenantContactModule, DiscountEditModule, BrowserAnimationsModule, MatCardModule],
imports: [
BrowserModule,
TenantContactModule,
DiscountEditModule,
BrowserAnimationsModule,
MatCardModule,
HttpClientModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
constructor(matIconRegistry: MatIconRegistry, domSanitizer: DomSanitizer) {
matIconRegistry.addSvgIconSet(domSanitizer.bypassSecurityTrustResourceUrl('./assets/mdi.svg'));
}
}
export class AppModule {}

0 comments on commit 7936390

Please sign in to comment.