Skip to content

Commit

Permalink
Add support for scss
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Florek authored and floreks committed Jan 4, 2018
1 parent 2adb076 commit ccdf939
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 34 deletions.
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"clang-format": "~1.0.55",
"codelyzer": "~4.0.1",
"concurrently": "~3.4.0",
"google-closure-compiler": "~20171023.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
Expand All @@ -40,14 +43,11 @@
"karma-coverage-istanbul-reporter": "~1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "~0.2.2",
"lite-server": "2.3.0",
"protractor": "~5.1.2",
"source-map-explorer": "~1.5.0",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"clang-format": "~1.0.55",
"concurrently": "~3.4.0",
"google-closure-compiler": "~20171023.0.1",
"lite-server": "2.3.0",
"source-map-explorer": "~1.5.0",
"typescript": "~2.4.2"
},
"engines": {
Expand Down
11 changes: 10 additions & 1 deletion src/app/frontend/chrome/component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Component } from '@angular/core';
import {Component, Inject} from '@angular/core';
import {MatIconRegistry} from "@angular/material";
import {DomSanitizer} from "@angular/platform-browser";

@Component({
selector: 'kd-chrome',
Expand All @@ -8,6 +10,13 @@ import { Component } from '@angular/core';
export class ChromeComponent {
title = 'app';

constructor(
@Inject(MatIconRegistry) iconRegistry: MatIconRegistry,
@Inject(DomSanitizer) sanitizer: DomSanitizer) {
iconRegistry.addSvgIcon('kd-logo',
sanitizer.bypassSecurityTrustResourceUrl('assets/images/kubernetes-logo.svg'));
}

getOverviewStateName() {
return 'someName';
}
Expand Down
37 changes: 19 additions & 18 deletions src/app/frontend/chrome/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,30 @@ import {ChromeComponent} from './component';
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {
MatButtonModule, MatIconModule, MatIconRegistry, MatProgressSpinnerModule, MatToolbarModule,
MatTooltipModule
MatButtonModule, MatIconModule, MatIconRegistry, MatProgressSpinnerModule, MatToolbarModule,
MatTooltipModule
} from '@angular/material';
import {FlexLayoutModule} from "@angular/flex-layout";
import {HttpClientModule} from "@angular/common/http";
import {PipesModule} from "../common/pipes/module";


@NgModule({
declarations: [
ChromeComponent
],
imports: [
BrowserModule,
MatToolbarModule,
MatIconModule,
MatTooltipModule,
MatButtonModule,
MatProgressSpinnerModule,
FlexLayoutModule,
PipesModule
],
providers: [MatIconRegistry],
bootstrap: [ChromeComponent]
declarations: [
ChromeComponent
],
imports: [
BrowserModule,
MatToolbarModule,
MatIconModule,
MatTooltipModule,
MatButtonModule,
MatProgressSpinnerModule,
FlexLayoutModule,
HttpClientModule,
PipesModule
],
providers: [MatIconRegistry],
bootstrap: [ChromeComponent]
})
export class ChromeModule {
}
2 changes: 1 addition & 1 deletion src/app/frontend/chrome/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="kd-logo-bar">
<a href="{{getOverviewStateName()}}"
class="kd-toolbar-logo-link">
<mat-icon svgIcon="assets/images/kubernetes-logo.svg"
<mat-icon svgIcon="kd-logo"
class="kd-toolbar-logo">
</mat-icon>
<mat-icon svgIcon="assets/images/kubernetes-logo-text.svg"
Expand Down
1 change: 0 additions & 1 deletion src/app/frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<link rel="icon"
type="image/png"
href="assets/images/kubernetes-logo.png"/>
<link href=”https://fonts.googleapis.com/icon?family=Material+Icons" rel=”stylesheet”>
<meta name="viewport"
content="width=device-width">
</head>
Expand Down
10 changes: 2 additions & 8 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"compileOnSave": false,
"compilerOptions": {
"outDir": "./.tmp/out-tsc",
"sourceMap": false,
"sourceMap": true,
"module": "es2015",
"moduleResolution": "node",
"noImplicitAny": true,
Expand All @@ -20,11 +20,5 @@
"es2017",
"dom"
]
},
"exclude": [
"vendor",
"node_modules",
"built",
"dist"
]
}
}

0 comments on commit ccdf939

Please sign in to comment.