misc/ upgrade to Angular 11
This commit is contained in:
@@ -42,13 +42,14 @@
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
"@typescript-eslint/no-unsafe-call": 0,
|
||||
"@typescript-eslint/no-unsafe-member-access": 0,
|
||||
"@typescript-eslint/no-unsafe-assignment": 0,
|
||||
"@typescript-eslint/no-unsafe-return": 0,
|
||||
"@typescript-eslint/no-floating-promises": 0,
|
||||
"@typescript-eslint/semi": "error",
|
||||
"@angular-eslint/use-injectable-provided-in": "error",
|
||||
"@angular-eslint/no-attribute-decorator": "error"
|
||||
}
|
||||
|
||||
11
README.md
11
README.md
@@ -15,9 +15,9 @@ Bootstrap and package your project with Angular 10 and Electron 9 (Typescript +
|
||||
|
||||
Currently runs with:
|
||||
|
||||
- Angular v10.0.14
|
||||
- Electron v9.3.0
|
||||
- Electron Builder v22.8.0
|
||||
- Angular v11.0.0
|
||||
- Electron v10.1.5
|
||||
- Electron Builder v22.9.1
|
||||
|
||||
With this sample, you can :
|
||||
|
||||
@@ -27,7 +27,7 @@ With this sample, you can :
|
||||
|
||||
/!\ Hot reload only pertains to the renderer process. The main electron process is not able to be hot reloaded, only restarted.
|
||||
|
||||
/!\ Angular 10.x CLI needs Node 10.13 or later to work correctly.
|
||||
/!\ Angular 11.x CLI needs Node 10.13 or later to work correctly.
|
||||
|
||||
## Getting Started
|
||||
|
||||
@@ -106,7 +106,8 @@ Note: To make it work behind a proxy, you can add this proxy exception in your t
|
||||
- Angular 7 & Electron 3 : Branch [angular7](https://github.com/maximegris/angular-electron/tree/angular7)
|
||||
- Angular 8 & Electron 7 : Branch [angular8](https://github.com/maximegris/angular-electron/tree/angular8)
|
||||
- Angular 9 & Electron 7 : Branch [angular9](https://github.com/maximegris/angular-electron/tree/angular9)
|
||||
- Angular 10 & Electron 9 : (master)
|
||||
- Angular 10 & Electron 9 : Branch [angular10](https://github.com/maximegris/angular-electron/tree/angular9)
|
||||
- Angular 11 & Electron 10 : (master)
|
||||
|
||||
[build-badge]: https://travis-ci.org/maximegris/angular-electron.svg?branch=master&style=style=flat-square
|
||||
[build]: https://travis-ci.org/maximegris/angular-electron
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
|
||||
62
package.json
62
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "angular-electron",
|
||||
"version": "8.0.6",
|
||||
"description": "Angular 10 with Electron (Typescript + SASS + Hot Reload)",
|
||||
"version": "9.0.0",
|
||||
"description": "Angular 11 with Electron (Typescript + SASS + Hot Reload)",
|
||||
"homepage": "https://github.com/maximegris/angular-electron",
|
||||
"author": {
|
||||
"name": "Maxime GRIS",
|
||||
@@ -9,7 +9,7 @@
|
||||
},
|
||||
"keywords": [
|
||||
"angular",
|
||||
"angular 10",
|
||||
"angular 11",
|
||||
"electron",
|
||||
"nodejs",
|
||||
"typescript",
|
||||
@@ -40,55 +40,59 @@
|
||||
"version": "conventional-changelog -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
|
||||
"lint": "ng lint"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "10.0.1",
|
||||
"@angular-devkit/build-angular": "0.1001.3",
|
||||
"@angular-eslint/builder": "0.4.0-beta.2",
|
||||
"@angular-eslint/eslint-plugin": "0.4.0-beta.2",
|
||||
"@angular-eslint/eslint-plugin-template": "0.4.0-beta.2",
|
||||
"@angular-eslint/template-parser": "0.4.0-beta.2",
|
||||
"@angular/cli": "10.1.3",
|
||||
"@angular/common": "10.1.3",
|
||||
"@angular/compiler": "10.1.3",
|
||||
"@angular/compiler-cli": "10.1.3",
|
||||
"@angular/core": "10.1.3",
|
||||
"@angular/forms": "10.1.3",
|
||||
"@angular/language-service": "10.1.3",
|
||||
"@angular/platform-browser": "10.1.3",
|
||||
"@angular/platform-browser-dynamic": "10.1.3",
|
||||
"@angular/router": "10.1.3",
|
||||
"@angular-devkit/build-angular": "0.1100.1",
|
||||
"@angular-eslint/builder": "0.8.0-beta.0",
|
||||
"@angular-eslint/eslint-plugin": "0.8.0-beta.0",
|
||||
"@angular-eslint/eslint-plugin-template": "0.8.0-beta.0",
|
||||
"@angular-eslint/schematics": "0.8.0-beta.0",
|
||||
"@angular-eslint/template-parser": "0.8.0-beta.0",
|
||||
"@angular/cli": "11.0.1",
|
||||
"@angular/common": "11.0.0",
|
||||
"@angular/compiler": "11.0.0",
|
||||
"@angular/compiler-cli": "11.0.0",
|
||||
"@angular/core": "11.0.0",
|
||||
"@angular/forms": "11.0.0",
|
||||
"@angular/language-service": "11.0.0",
|
||||
"@angular/platform-browser": "11.0.0",
|
||||
"@angular/platform-browser-dynamic": "11.0.0",
|
||||
"@angular/router": "11.0.0",
|
||||
"@ngx-translate/core": "13.0.0",
|
||||
"@ngx-translate/http-loader": "6.0.0",
|
||||
"@types/jasmine": "3.5.14",
|
||||
"@types/jasmine": "3.6.0",
|
||||
"@types/jasminewd2": "2.0.8",
|
||||
"@types/mocha": "8.0.3",
|
||||
"@types/node": "12.12.6",
|
||||
"@typescript-eslint/eslint-plugin": "4.2.0",
|
||||
"@typescript-eslint/eslint-plugin-tslint": "4.2.0",
|
||||
"@typescript-eslint/parser": "4.2.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.3.0",
|
||||
"@typescript-eslint/eslint-plugin-tslint": "3.10.1",
|
||||
"@typescript-eslint/parser": "4.3.0",
|
||||
"chai": "4.2.0",
|
||||
"conventional-changelog-cli": "2.1.0",
|
||||
"core-js": "3.6.5",
|
||||
"cross-env": "7.0.2",
|
||||
"electron": "10.1.2",
|
||||
"electron-builder": "22.8.1",
|
||||
"electron": "10.1.5",
|
||||
"electron-builder": "22.9.1",
|
||||
"electron-reload": "1.5.0",
|
||||
"eslint": "7.10.0",
|
||||
"eslint": "7.13.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"eslint-plugin-jsdoc": "30.7.6",
|
||||
"eslint-plugin-prefer-arrow": "1.2.2",
|
||||
"jasmine-core": "3.6.0",
|
||||
"jasmine-spec-reporter": "6.0.0",
|
||||
"karma": "5.2.3",
|
||||
"karma-coverage-istanbul-reporter": "3.0.3",
|
||||
"karma-electron": "6.3.1",
|
||||
"karma-jasmine": "4.0.1",
|
||||
"karma-jasmine-html-reporter": "1.5.4",
|
||||
"karma-jasmine": "4.0.0",
|
||||
"karma-jasmine-html-reporter": "1.5.0",
|
||||
"mocha": "8.1.3",
|
||||
"npm-run-all": "4.1.5",
|
||||
"rxjs": "6.6.3",
|
||||
"spectron": "12.0.0",
|
||||
"ts-node": "9.0.0",
|
||||
"tslib": "2.0.1",
|
||||
"typescript": "3.9.7",
|
||||
"tslib": "2.0.3",
|
||||
"typescript": "4.0.5",
|
||||
"wait-on": "5.0.1",
|
||||
"webdriver-manager": "12.1.7",
|
||||
"zone.js": "0.10.3"
|
||||
|
||||
@@ -19,7 +19,7 @@ const routes: Routes = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot(routes),
|
||||
RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' }),
|
||||
HomeRoutingModule,
|
||||
DetailRoutingModule
|
||||
],
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { ElectronService } from './core/services';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [AppComponent],
|
||||
providers: [ElectronService],
|
||||
@@ -13,7 +13,7 @@ describe('AppComponent', () => {
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
it('should create the app', async(() => {
|
||||
it('should create the app', waitForAsync(() => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
|
||||
import { DetailComponent } from './detail.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@@ -9,7 +9,7 @@ describe('DetailComponent', () => {
|
||||
let component: DetailComponent;
|
||||
let fixture: ComponentFixture<DetailComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [DetailComponent],
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule]
|
||||
@@ -26,7 +26,7 @@ describe('DetailComponent', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should render title in a h1 tag', async(() => {
|
||||
it('should render title in a h1 tag', waitForAsync(() => {
|
||||
const compiled = fixture.debugElement.nativeElement;
|
||||
expect(compiled.querySelector('h1').textContent).toContain(
|
||||
'PAGES.DETAIL.TITLE'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
|
||||
import { HomeComponent } from './home.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@@ -8,7 +8,7 @@ describe('HomeComponent', () => {
|
||||
let component: HomeComponent;
|
||||
let fixture: ComponentFixture<HomeComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [HomeComponent],
|
||||
imports: [TranslateModule.forRoot(), RouterTestingModule]
|
||||
@@ -25,7 +25,7 @@ describe('HomeComponent', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should render title in a h1 tag', async(() => {
|
||||
it('should render title in a h1 tag', waitForAsync(() => {
|
||||
const compiled = fixture.debugElement.nativeElement;
|
||||
expect(compiled.querySelector('h1').textContent).toContain(
|
||||
'PAGES.HOME.TITLE'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
|
||||
import { PageNotFoundComponent } from './page-not-found.component';
|
||||
|
||||
@@ -6,7 +6,7 @@ describe('PageNotFoundComponent', () => {
|
||||
let component: PageNotFoundComponent;
|
||||
let fixture: ComponentFixture<PageNotFoundComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [PageNotFoundComponent]
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/app",
|
||||
"module": "es2015",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/spec",
|
||||
"module": "commonjs",
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"module": "es2020",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"target": "es5",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"es2017",
|
||||
"es2016",
|
||||
"es2015",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/main.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.d.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
@@ -1,17 +1,32 @@
|
||||
/*
|
||||
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
|
||||
It is not intended to be used to perform a compilation.
|
||||
|
||||
To learn more about this file see: https://angular.io/config/solution-tsconfig.
|
||||
*/
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./src/tsconfig.app.json"
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"module": "es2020",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"target": "es5",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"es2017",
|
||||
"es2016",
|
||||
"es2015",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "./src/tsconfig.spec.json"
|
||||
}
|
||||
"files": [
|
||||
"src/main.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.d.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user