Change to LESS and Ivy

This commit is contained in:
Mathieu Sanchez 2019-06-06 16:01:35 +09:00
parent 2fb0ee2861
commit 809781f5b1
9 changed files with 45 additions and 37 deletions

View File

@ -5,7 +5,30 @@
"projects": {
"PQ-Man": {
"projectType": "application",
"schematics": {},
"schematics": {
"@schematics/angular:component": {
"style": "less",
"skipTests": true
},
"@schematics/angular:class": {
"skipTests": true
},
"@schematics/angular:directive": {
"skipTests": true
},
"@schematics/angular:guard": {
"skipTests": true
},
"@schematics/angular:module": {
"skipTests": true
},
"@schematics/angular:pipe": {
"skipTests": true
},
"@schematics/angular:service": {
"skipTests": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
@ -23,7 +46,7 @@
"src/assets"
],
"styles": [
"src/styles.css"
"src/styles.less"
],
"scripts": []
},
@ -83,7 +106,7 @@
"src/assets"
],
"styles": [
"src/styles.css"
"src/styles.less"
],
"scripts": []
}

View File

@ -0,0 +1,10 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }

View File

@ -18,3 +18,4 @@
</li>
</ul>
<router-outlet></router-outlet>

View File

@ -1,31 +0,0 @@
import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'PQ-Man'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('PQ-Man');
});
it('should render title in a h1 tag', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('Welcome to PQ-Man!');
});
});

View File

@ -3,7 +3,7 @@ import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
styleUrls: ['./app.component.less']
})
export class AppComponent {
title = 'PQ-Man';

View File

@ -1,6 +1,7 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@NgModule({
@ -8,7 +9,8 @@ import { AppComponent } from './app.component';
AppComponent
],
imports: [
BrowserModule
BrowserModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent]

View File

@ -10,5 +10,8 @@
"exclude": [
"src/test.ts",
"src/**/*.spec.ts"
]
],
"angularCompilerOptions": {
"enableIvy": true
}
}