From 7a062a50d4e521f7b95bc3ed210692a38cee80a4 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 10 Sep 2020 15:30:40 +0000 Subject: [PATCH] Updated from generator v9.0.0 --- .browserslistrc | 18 ++++ .editorconfig | 2 +- angular.json | 6 +- docs/i18n.md | 6 +- e2e/tsconfig.json | 7 +- ngsw-config.json | 10 +- package.json | 91 ++++++++++--------- .../@shared/loader/loader.component.spec.ts | 4 +- src/app/about/about-routing.module.ts | 4 +- src/app/about/about.component.spec.ts | 4 +- src/app/app.component.spec.ts | 6 +- src/app/auth/auth-routing.module.ts | 4 +- src/app/auth/login.component.spec.ts | 4 +- src/app/home/home-routing.module.ts | 4 +- src/app/home/home.component.spec.ts | 4 +- src/app/home/home.module.ts | 3 - src/app/home/quote.service.spec.ts | 2 +- src/app/i18n/i18n.service.spec.ts | 8 +- src/app/i18n/i18n.service.ts | 10 -- .../i18n/language-selector.component.spec.ts | 4 +- src/app/shell/header/header.component.spec.ts | 4 +- src/app/shell/shell.component.spec.ts | 4 +- src/browserslist | 10 -- src/index.html | 2 +- src/{manifest.json => manifest.webmanifest} | 10 +- src/polyfills.ts | 11 ++- tsconfig.app.json | 3 +- tsconfig.base.json | 39 ++++++++ tsconfig.json | 50 +++------- tsconfig.spec.json | 3 +- tslint.json | 2 +- 31 files changed, 176 insertions(+), 163 deletions(-) create mode 100644 .browserslistrc delete mode 100644 src/browserslist rename src/{manifest.json => manifest.webmanifest} (67%) create mode 100644 tsconfig.base.json diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 00000000..839e216b --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,18 @@ +# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries + +# For the full list of supported browsers by the Angular framework, please see: +# https://angular.io/guide/browser-support + +# You can see what browsers were selected by your queries by running: +# npx browserslist + +last 1 Chrome version +last 1 Firefox version +last 2 Edge major versions +last 2 Safari major versions +last 2 iOS major versions +Firefox ESR +not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line. +not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. \ No newline at end of file diff --git a/.editorconfig b/.editorconfig index 819d984b..d8861645 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,4 @@ -# Editor configuration, see http://editorconfig.org +# Editor configuration, see https://editorconfig.org root = true [*] diff --git a/angular.json b/angular.json index 1fed9584..a9a5185f 100644 --- a/angular.json +++ b/angular.json @@ -27,7 +27,7 @@ "src/favicon.ico", "src/apple-touch-icon.png", "src/robots.txt", - "src/manifest.json", + "src/manifest.webmanifest", "src/assets" ], "styles": [ @@ -42,7 +42,6 @@ "sourceMap": false, "extractCss": true, "namedChunks": false, - "aot": true, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, @@ -54,7 +53,8 @@ }, { "type": "anyComponentStyle", - "maximumWarning": "6kb" + "maximumWarning": "6kb", + "maximumError": "10kb" } ], "serviceWorker": true, diff --git a/docs/i18n.md b/docs/i18n.md index 9e53a8e4..18f17342 100644 --- a/docs/i18n.md +++ b/docs/i18n.md @@ -41,12 +41,12 @@ Do no forget to edit the files in `src/environment` to add the supported languag If strings are not directly passed to `translateService` or put in HTML templates, they may be missing from the extraction process. -For these cases, you have to use the dummy `extract()` function: +For these cases, you have to use the dummy `marker()` function: ```typescript -import { extract } from './core/i18n.service'; +import { marker } from '@biesbjerg/ngx-translate-extract-marker'; function toBeTranslatedLater() { - return extract('A string to be translated'); + return marker('A string to be translated'); } ``` diff --git a/e2e/tsconfig.json b/e2e/tsconfig.json index 39b800f7..db0d36bb 100644 --- a/e2e/tsconfig.json +++ b/e2e/tsconfig.json @@ -1,13 +1,14 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ { - "extends": "../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "../out-tsc/e2e", "module": "commonjs", - "target": "es5", + "target": "es2018", "types": [ "jasmine", "jasminewd2", "node" ] } -} +} \ No newline at end of file diff --git a/ngsw-config.json b/ngsw-config.json index 3c935da9..0616677b 100644 --- a/ngsw-config.json +++ b/ngsw-config.json @@ -1,4 +1,5 @@ { + "$schema": "./node_modules/@angular/service-worker/config/schema.json", "index": "/index.html", "assetGroups": [ { @@ -8,7 +9,7 @@ "files": [ "/favicon.ico", "/index.html", - "/manifest.json", + "/manifest.webmanifest", "/*.css", "/*.js" ] @@ -21,12 +22,9 @@ "resources": { "files": [ "/assets/**", - "/*.woff", - "/*.woff2", - "/*.ttf", - "/*.eot" + "/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)" ] } } ] -} +} \ No newline at end of file diff --git a/package.json b/package.json index 29646eca..1e5dc05a 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "test": "npm run env -s && ng test", "test:ci": "npm run env -s && npm run lint -s && ng test --configuration=ci", "e2e": "npm run env -s && ng e2e", - "translations:extract": "ngx-translate-extract --input ./src --output ./src/translations/template.json --format=json --clean --sort --marker extract", + "translations:extract": "ngx-translate-extract --input ./src --output ./src/translations/template.json --format=json --clean --sort", "docs": "hads ./docs -o", "env": "ngx-scripts env npm_package_version", "prettier": "prettier --write \"./{src,e2e}/**/*.{ts,js,html,scss}\"", @@ -20,57 +20,58 @@ "generate": "ng generate" }, "dependencies": { - "@angular/animations": "^9.1.9", - "@angular/common": "^9.1.9", - "@angular/compiler": "^9.1.9", - "@angular/core": "^9.1.9", - "@angular/forms": "^9.1.9", - "@angular/platform-browser": "^9.1.9", - "@angular/platform-browser-dynamic": "^9.1.9", - "@angular/router": "^9.1.9", - "@ngx-translate/core": "^12.0.0", - "@angular/service-worker": "^9.1.9", - "@ng-bootstrap/ng-bootstrap": "^6.0.2", - "bootstrap": "^4.1.1", - "@fortawesome/fontawesome-free": "^5.1.0", - "@angular/localize": "^9.1.0", - "rxjs": "^6.5.5", - "tslib": "^1.10.1", - "zone.js": "^0.10.3" + "@angular/animations": "^10.0.14", + "@angular/common": "^10.0.14", + "@angular/compiler": "^10.0.14", + "@angular/core": "^10.0.14", + "@angular/forms": "^10.0.14", + "@angular/localize": "^10.0.14", + "@angular/platform-browser": "^10.0.14", + "@angular/platform-browser-dynamic": "^10.0.14", + "@angular/router": "^10.0.14", + "@ngx-translate/core": "^13.0.0", + "@angular/service-worker": "^10.0.14", + "@ng-bootstrap/ng-bootstrap": "^7.0.0", + "bootstrap": "^4.5.2", + "@fortawesome/fontawesome-free": "^5.14.0", + "rxjs": "^6.6.2", + "tslib": "^2.0.1", + "zone.js": "~0.10.3" }, "devDependencies": { - "@angular-builders/jest": "^8.3.2", - "@angular/cli": "~9.1.7", - "@angular/compiler-cli": "^9.1.9", - "@angular/language-service": "^9.1.9", - "@angular-devkit/build-angular": "^0.901.7", - "@angularclass/hmr": "^2.1.3", - "@biesbjerg/ngx-translate-extract": "^4.2.0", + "@angular-builders/jest": "^10.0.0", + "@angular/cli": "~10.0.8", + "@angular/compiler-cli": "^10.0.14", + "@angular/language-service": "^10.0.14", + "@angular-devkit/build-angular": "^0.1000.8", + "@angularclass/hmr": "^3.0.0", + "@biesbjerg/ngx-translate-extract": "^7.0.2", + "@biesbjerg/ngx-translate-extract-marker": "^1.0.0", "@ngx-rocket/scripts": "^4.0.0", - "@types/jasmine": "^3.3.13", - "@types/jasminewd2": "^2.0.3", - "@types/jest": "^25.1.2", - "@types/node": "^12.11.1", - "codelyzer": "^5.1.2", - "hads": "^2.0.1", - "htmlhint": "^0.11.0", + "@types/jasmine": "^3.5.14", + "@types/jasminewd2": "^2.0.8", + "@types/jest": "^26.0.12", + "@types/node": "^12.12.54", + "codelyzer": "^6.0.0", + "hads": "^2.1.0", + "htmlhint": "^0.14.1", "https-proxy-agent": "^5.0.0", - "jasmine-core": "~3.5.0", + "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.1", - "jest": "^25.1.0", - "prettier": "^2.0.2", - "tslint-config-prettier": "^1.14.0", - "stylelint-config-prettier": "^8.0.1", - "pretty-quick": "^2.0.1", - "husky": "^4.2.3", - "protractor": "~5.4.3", - "stylelint": "~13.2.1", + "jest": "^26.4.2", + "prettier": "^2.1.1", + "tslint-config-prettier": "^1.18.0", + "stylelint-config-prettier": "^8.0.2", + "pretty-quick": "^3.0.0", + "husky": "^4.2.5", + "protractor": "~7.0.0", + "stylelint": "~13.6.1", "stylelint-config-recommended-scss": "~4.2.0", "stylelint-config-standard": "~20.0.0", - "stylelint-scss": "~3.16.0", - "ts-node": "^8.8.1", - "tslint": "~5.20.1", - "typescript": "~3.8.3" + "stylelint-scss": "~3.18.0", + "ts-node": "^9.0.0", + "tslint": "~6.1.0", + "typescript": "~3.9.5" }, "prettier": { "singleQuote": true, diff --git a/src/app/@shared/loader/loader.component.spec.ts b/src/app/@shared/loader/loader.component.spec.ts index 0af8b940..4fe0a087 100644 --- a/src/app/@shared/loader/loader.component.spec.ts +++ b/src/app/@shared/loader/loader.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { LoaderComponent } from './loader.component'; @@ -6,7 +6,7 @@ describe('LoaderComponent', () => { let component: LoaderComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [LoaderComponent] }) diff --git a/src/app/about/about-routing.module.ts b/src/app/about/about-routing.module.ts index e44bc446..44d9461a 100644 --- a/src/app/about/about-routing.module.ts +++ b/src/app/about/about-routing.module.ts @@ -1,13 +1,13 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; +import { marker } from '@biesbjerg/ngx-translate-extract-marker'; -import { extract } from '@app/i18n'; import { Shell } from '@app/shell/shell.service'; import { AboutComponent } from './about.component'; const routes: Routes = [ Shell.childRoutes([ - { path: 'about', component: AboutComponent, data: { title: extract('About') } } + { path: 'about', component: AboutComponent, data: { title: marker('About') } } ]) ]; diff --git a/src/app/about/about.component.spec.ts b/src/app/about/about.component.spec.ts index 3ef7c8d6..264ea44b 100644 --- a/src/app/about/about.component.spec.ts +++ b/src/app/about/about.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { AboutComponent } from './about.component'; @@ -6,7 +6,7 @@ describe('AboutComponent', () => { let component: AboutComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [AboutComponent] }) diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 531daeb1..179ed093 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -1,4 +1,4 @@ -import { TestBed, async } from '@angular/core/testing'; +import { TestBed, waitForAsync } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { TranslateModule } from '@ngx-translate/core'; @@ -6,7 +6,7 @@ import { CoreModule } from '@core'; import { AppComponent } from './app.component'; describe('AppComponent', () => { - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, @@ -18,7 +18,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(); diff --git a/src/app/auth/auth-routing.module.ts b/src/app/auth/auth-routing.module.ts index 4f936e28..a9c09b92 100644 --- a/src/app/auth/auth-routing.module.ts +++ b/src/app/auth/auth-routing.module.ts @@ -1,11 +1,11 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; +import { marker } from '@biesbjerg/ngx-translate-extract-marker'; -import { extract } from '@app/i18n'; import { LoginComponent } from './login.component'; const routes: Routes = [ - { path: 'login', component: LoginComponent, data: { title: extract('Login') } } + { path: 'login', component: LoginComponent, data: { title: marker('Login') } } ]; @NgModule({ diff --git a/src/app/auth/login.component.spec.ts b/src/app/auth/login.component.spec.ts index ad63a8c4..0ca3f3bc 100644 --- a/src/app/auth/login.component.spec.ts +++ b/src/app/auth/login.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { TranslateModule } from '@ngx-translate/core'; import { RouterTestingModule } from '@angular/router/testing'; import { ReactiveFormsModule } from '@angular/forms'; @@ -15,7 +15,7 @@ describe('LoginComponent', () => { let component: LoginComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ NgbModule, diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts index 99b91235..e9cd974f 100644 --- a/src/app/home/home-routing.module.ts +++ b/src/app/home/home-routing.module.ts @@ -1,14 +1,14 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; +import { marker } from '@biesbjerg/ngx-translate-extract-marker'; -import { extract } from '@app/i18n'; import { HomeComponent } from './home.component'; import { Shell } from '@app/shell/shell.service'; const routes: Routes = [ Shell.childRoutes([ { path: '', redirectTo: '/home', pathMatch: 'full' }, - { path: 'home', component: HomeComponent, data: { title: extract('Home') } } + { path: 'home', component: HomeComponent, data: { title: marker('Home') } } ]) ]; diff --git a/src/app/home/home.component.spec.ts b/src/app/home/home.component.spec.ts index 787e8efc..45fa7c2f 100644 --- a/src/app/home/home.component.spec.ts +++ b/src/app/home/home.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { CoreModule } from '@core'; @@ -10,7 +10,7 @@ describe('HomeComponent', () => { let component: HomeComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ CoreModule, diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index 615ca647..0823023a 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -2,17 +2,14 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; -import { CoreModule } from '@core'; import { SharedModule } from '@shared'; import { HomeRoutingModule } from './home-routing.module'; import { HomeComponent } from './home.component'; -import { QuoteService } from './quote.service'; @NgModule({ imports: [ CommonModule, TranslateModule, - CoreModule, SharedModule, HomeRoutingModule ], diff --git a/src/app/home/quote.service.spec.ts b/src/app/home/quote.service.spec.ts index 80f0c379..7d1cf665 100644 --- a/src/app/home/quote.service.spec.ts +++ b/src/app/home/quote.service.spec.ts @@ -1,5 +1,5 @@ import { Type } from '@angular/core'; -import { TestBed, async } from '@angular/core/testing'; +import { TestBed } from '@angular/core/testing'; import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { CoreModule } from '@core'; diff --git a/src/app/i18n/i18n.service.spec.ts b/src/app/i18n/i18n.service.spec.ts index 49658d6a..1df7e07a 100644 --- a/src/app/i18n/i18n.service.spec.ts +++ b/src/app/i18n/i18n.service.spec.ts @@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing'; import { TranslateService, LangChangeEvent } from '@ngx-translate/core'; import { Subject } from 'rxjs'; -import { extract, I18nService } from './i18n.service'; +import { I18nService } from './i18n.service'; const defaultLanguage = 'en-US'; const supportedLanguages = ['eo', 'en-US', 'fr-FR']; @@ -58,12 +58,6 @@ describe('I18nService', () => { localStorage.removeItem('language'); }); - describe('extract', () => { - it('should not modify string', () => { - expect(extract('Hello world !')).toEqual('Hello world !'); - }); - }); - describe('init', () => { it('should init with default language', () => { // Act diff --git a/src/app/i18n/i18n.service.ts b/src/app/i18n/i18n.service.ts index b38b7a76..a34f5a81 100644 --- a/src/app/i18n/i18n.service.ts +++ b/src/app/i18n/i18n.service.ts @@ -9,16 +9,6 @@ import frFR from '../../translations/fr-FR.json'; const log = new Logger('I18nService'); const languageKey = 'language'; -/** - * Pass-through function to mark a string for translation extraction. - * Running `npm translations:extract` will include the given string by using this. - * @param s The string to extract for translation. - * @return The same string. - */ -export function extract(s: string) { - return s; -} - @Injectable({ providedIn: 'root' }) diff --git a/src/app/i18n/language-selector.component.spec.ts b/src/app/i18n/language-selector.component.spec.ts index 0cf855ed..1a3dff41 100644 --- a/src/app/i18n/language-selector.component.spec.ts +++ b/src/app/i18n/language-selector.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { TranslateModule } from '@ngx-translate/core'; import { I18nService } from './i18n.service'; @@ -8,7 +8,7 @@ describe('LanguageSelectorComponent', () => { let component: LanguageSelectorComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ TranslateModule.forRoot() diff --git a/src/app/shell/header/header.component.spec.ts b/src/app/shell/header/header.component.spec.ts index 42ff52f8..2ef09ed6 100644 --- a/src/app/shell/header/header.component.spec.ts +++ b/src/app/shell/header/header.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { TranslateModule } from '@ngx-translate/core'; import { RouterTestingModule } from '@angular/router/testing'; @@ -13,7 +13,7 @@ describe('HeaderComponent', () => { let component: HeaderComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, diff --git a/src/app/shell/shell.component.spec.ts b/src/app/shell/shell.component.spec.ts index 1c24be22..20c0b869 100644 --- a/src/app/shell/shell.component.spec.ts +++ b/src/app/shell/shell.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { TranslateModule } from '@ngx-translate/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; @@ -16,7 +16,7 @@ describe('ShellComponent', () => { let component: ShellComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, diff --git a/src/browserslist b/src/browserslist deleted file mode 100644 index 9c16085e..00000000 --- a/src/browserslist +++ /dev/null @@ -1,10 +0,0 @@ -# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers -# For additional information regarding the format and rule options, please see: -# https://github.com/browserslist/browserslist#queries - -last 2 versions -> 0.5% -Firefox ESR -not dead -# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed -not IE 9-11 diff --git a/src/index.html b/src/index.html index aec5cfec..8f538903 100644 --- a/src/index.html +++ b/src/index.html @@ -8,7 +8,7 @@ - + diff --git a/src/manifest.json b/src/manifest.webmanifest similarity index 67% rename from src/manifest.json rename to src/manifest.webmanifest index e1ec33e9..2b0f752f 100644 --- a/src/manifest.json +++ b/src/manifest.webmanifest @@ -3,19 +3,21 @@ "short_name": "ngX-Rocket", "theme_color": "#488aff", "background_color": "#488aff", - "scope": "/", - "start_url": "/", "display": "standalone", + "scope": "./", + "start_url": "./", "icons": [ { "src": "assets/ngx-rocket-logo.png", "sizes": "512x512", - "type": "image/png" + "type": "image/png", + "purpose": "maskable any" }, { "src": "assets/ngx-rocket-logo@192.png", "sizes": "192x192", - "type": "image/png" + "type": "image/png", + "purpose": "maskable any" } ] } diff --git a/src/polyfills.ts b/src/polyfills.ts index ffa3524e..3b9db500 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -1,3 +1,8 @@ +/*************************************************************************************************** + * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. + */ +import '@angular/localize/init'; + /** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. @@ -35,7 +40,7 @@ * will put import in the top of bundle, so user need to create a separate file * in this directory (for example: zone-flags.ts), and put the following flags * into that file, and then add the following code before importing zone.js. - * import './zone-flags.ts'; + * import './zone-flags'; * * The flags allowed in zone-flags.ts are listed here. * @@ -57,10 +62,6 @@ */ import 'zone.js/dist/zone'; // Included with Angular CLI. -/*************************************************************************************************** - * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. - */ -import '@angular/localize/init'; /*************************************************************************************************** * APPLICATION IMPORTS diff --git a/tsconfig.app.json b/tsconfig.app.json index f758d982..232c3a5c 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -1,5 +1,6 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ { - "extends": "./tsconfig.json", + "extends": "./tsconfig.base.json", "compilerOptions": { "outDir": "./out-tsc/app", "types": [] diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 00000000..737521ca --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,39 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "compileOnSave": false, + "compilerOptions": { + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "module": "es2020", + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "importHelpers": true, + "noImplicitAny": true, + "suppressImplicitAnyIndexErrors": true, + "target": "es2015", + "typeRoots": [ + "node_modules/@types" + ], + "lib": [ + "es2018", + "dom" + ], + "baseUrl": "./", + "paths": { + "@app/*": ["src/app/*"], + "@core": ["src/app/@core"], + "@core/*": ["src/app/@core/*"], + "@shared": ["src/app/@shared"], + "@shared/*": ["src/app/@shared/*"], + "@env/*": ["src/environments/*"] + } + }, + "angularCompilerOptions": { + "fullTemplateTypeCheck": true, + "strictInjectionParameters": true, + "preserveWhitespaces": true + } + } + \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index d9cc0ce4..7e00e707 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,37 +1,17 @@ +/* + 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. +*/ { - "compileOnSave": false, - "compilerOptions": { - "outDir": "./dist/out-tsc", - "sourceMap": true, - "declaration": false, - "module": "esnext", - "moduleResolution": "node", - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "importHelpers": true, - "noImplicitAny": true, - "suppressImplicitAnyIndexErrors": true, - "target": "es2015", - "typeRoots": [ - "node_modules/@types" - ], - "lib": [ - "es2018", - "dom" - ], - "baseUrl": "./", - "paths": { - "@app/*": ["src/app/*"], - "@core": ["src/app/@core"], - "@core/*": ["src/app/@core/*"], - "@shared": ["src/app/@shared"], - "@shared/*": ["src/app/@shared/*"], - "@env/*": ["src/environments/*"] + "files": [], + "references": [ + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.spec.json" } - }, - "angularCompilerOptions": { - "fullTemplateTypeCheck": true, - "strictInjectionParameters": true, - "preserveWhitespaces": true - } -} + ] +} \ No newline at end of file diff --git a/tsconfig.spec.json b/tsconfig.spec.json index 3c6aa1d8..ed6f900d 100644 --- a/tsconfig.spec.json +++ b/tsconfig.spec.json @@ -1,5 +1,6 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ { - "extends": "./tsconfig.json", + "extends": "./tsconfig.base.json", "compilerOptions": { "outDir": "./out-tsc/spec", "allowJs": true, diff --git a/tslint.json b/tslint.json index 4241014b..c0eabfb3 100644 --- a/tslint.json +++ b/tslint.json @@ -10,7 +10,7 @@ "array-type": false, "arrow-parens": false, "deprecation": { - "severity": "warn" + "severity": "warning" }, "import-blacklist": [ true,