mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-09-08 20:05:09 +00:00
build: upgrade to angular v12
This commit is contained in:
@@ -39,6 +39,7 @@
|
|||||||
"rules": {
|
"rules": {
|
||||||
"unicorn/filename-case": "error",
|
"unicorn/filename-case": "error",
|
||||||
"unicorn/no-array-callback-reference": "off",
|
"unicorn/no-array-callback-reference": "off",
|
||||||
|
"unicorn/prefer-object-from-entries": "off",
|
||||||
"unicorn/prevent-abbreviations": [
|
"unicorn/prevent-abbreviations": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
|
|||||||
+16
-12
@@ -14,12 +14,11 @@
|
|||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
"options": {
|
"options": {
|
||||||
"aot": true,
|
|
||||||
"outputPath": "www",
|
"outputPath": "www",
|
||||||
"index": "src/index.html",
|
"index": "src/index.html",
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
"polyfills": "src/polyfills.ts",
|
"polyfills": "src/polyfills.ts",
|
||||||
"tsConfig": "src/tsconfig.app.json",
|
"tsConfig": "tsconfig.app.json",
|
||||||
"assets": [
|
"assets": [
|
||||||
{
|
{
|
||||||
"glob": "**/*",
|
"glob": "**/*",
|
||||||
@@ -49,15 +48,23 @@
|
|||||||
],
|
],
|
||||||
"styles": [
|
"styles": [
|
||||||
{
|
{
|
||||||
"input": "src/theme/variables.scss"
|
"input": "src/theme/variables.scss",
|
||||||
|
"inject": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"input": "src/global.scss"
|
"input": "src/global.scss",
|
||||||
|
"inject": true
|
||||||
},
|
},
|
||||||
"./node_modules/leaflet/dist/leaflet.css",
|
"./node_modules/leaflet/dist/leaflet.css",
|
||||||
"./node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css"
|
"./node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css"
|
||||||
],
|
],
|
||||||
"scripts": []
|
"scripts": [],
|
||||||
|
"vendorChunk": true,
|
||||||
|
"extractLicenses": false,
|
||||||
|
"buildOptimizer": false,
|
||||||
|
"sourceMap": true,
|
||||||
|
"optimization": false,
|
||||||
|
"namedChunks": true
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
@@ -70,9 +77,7 @@
|
|||||||
"optimization": true,
|
"optimization": true,
|
||||||
"outputHashing": "all",
|
"outputHashing": "all",
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"extractCss": true,
|
|
||||||
"namedChunks": false,
|
"namedChunks": false,
|
||||||
"aot": true,
|
|
||||||
"extractLicenses": true,
|
"extractLicenses": true,
|
||||||
"vendorChunk": false,
|
"vendorChunk": false,
|
||||||
"buildOptimizer": true,
|
"buildOptimizer": true,
|
||||||
@@ -107,9 +112,7 @@
|
|||||||
"optimization": true,
|
"optimization": true,
|
||||||
"outputHashing": "all",
|
"outputHashing": "all",
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"extractCss": true,
|
|
||||||
"namedChunks": false,
|
"namedChunks": false,
|
||||||
"aot": true,
|
|
||||||
"extractLicenses": true,
|
"extractLicenses": true,
|
||||||
"vendorChunk": false,
|
"vendorChunk": false,
|
||||||
"buildOptimizer": true,
|
"buildOptimizer": true,
|
||||||
@@ -125,7 +128,8 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"defaultConfiguration": ""
|
||||||
},
|
},
|
||||||
"serve": {
|
"serve": {
|
||||||
"builder": "@angular-devkit/build-angular:dev-server",
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
@@ -156,8 +160,8 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"main": "src/test.ts",
|
"main": "src/test.ts",
|
||||||
"polyfills": "src/polyfills.ts",
|
"polyfills": "src/polyfills.ts",
|
||||||
"tsConfig": "src/tsconfig.spec.json",
|
"tsConfig": "tsconfig.spec.json",
|
||||||
"karmaConfig": "src/karma.conf.js",
|
"karmaConfig": "karma.conf.js",
|
||||||
"styles": [],
|
"styles": [],
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"assets": [
|
"assets": [
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ exports.config = {
|
|||||||
},
|
},
|
||||||
onPrepare() {
|
onPrepare() {
|
||||||
require('ts-node').register({
|
require('ts-node').register({
|
||||||
project: 'e2e/tsconfig.e2e.json'
|
project: 'e2e/tsconfig.json'
|
||||||
});
|
});
|
||||||
jasmine.getEnv().addReporter(new SpecReporter({
|
jasmine.getEnv().addReporter(new SpecReporter({
|
||||||
spec: {displayStacktrace: true}
|
spec: {displayStacktrace: true}
|
||||||
|
|||||||
@@ -1,10 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 StApps
|
||||||
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
// Karma configuration file, see link for more information
|
// Karma configuration file, see link for more information
|
||||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||||
var isDocker = require('is-docker');
|
var isDocker = require('is-docker');
|
||||||
|
|
||||||
module.exports = function (config) {
|
module.exports = function (config) {
|
||||||
config.set({
|
config.set({
|
||||||
basePath: '',
|
basePath: 'src',
|
||||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||||
plugins: [
|
plugins: [
|
||||||
require('karma-jasmine'),
|
require('karma-jasmine'),
|
||||||
Generated
+8749
-8643
File diff suppressed because it is too large
Load Diff
+65
-66
@@ -14,7 +14,7 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"build:prod": "ng build --prod",
|
"build:prod": "ng build --configuration production",
|
||||||
"build:fake": "ng build --configuration=fake",
|
"build:fake": "ng build --configuration=fake",
|
||||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'",
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'",
|
||||||
"check-configuration": "openstapps-configuration",
|
"check-configuration": "openstapps-configuration",
|
||||||
@@ -40,107 +40,106 @@
|
|||||||
"test": "ng test"
|
"test": "ng test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "9.1.13",
|
"@angular/animations": "12.2.5",
|
||||||
"@angular/cdk": "12.0.0",
|
"@angular/cdk": "12.2.5",
|
||||||
"@angular/common": "9.1.13",
|
"@angular/common": "12.2.5",
|
||||||
"@angular/core": "9.1.13",
|
"@angular/core": "12.2.5",
|
||||||
"@angular/forms": "9.1.13",
|
"@angular/forms": "12.2.5",
|
||||||
"@angular/platform-browser": "9.1.13",
|
"@angular/platform-browser": "12.2.5",
|
||||||
"@angular/platform-browser-dynamic": "9.1.13",
|
"@angular/platform-browser-dynamic": "12.2.5",
|
||||||
"@angular/router": "9.1.13",
|
"@angular/router": "12.2.5",
|
||||||
"@asymmetrik/ngx-leaflet": "5.0.2",
|
"@asymmetrik/ngx-leaflet": "8.1.0",
|
||||||
"@asymmetrik/ngx-leaflet-markercluster": "2.1.1",
|
"@asymmetrik/ngx-leaflet-markercluster": "5.0.1",
|
||||||
"@capacitor/core": "2.4.6",
|
"@capacitor/core": "2.4.6",
|
||||||
"@ionic-native/core": "5.29.0",
|
"@ionic-native/core": "5.36.0",
|
||||||
"@ionic-native/dialogs": "5.31.1",
|
"@ionic-native/diagnostic": "5.36.0",
|
||||||
"@ionic-native/diagnostic": "5.32.0",
|
"@ionic-native/dialogs": "5.36.0",
|
||||||
"@ionic-native/geolocation": "5.29.0",
|
"@ionic-native/geolocation": "5.36.0",
|
||||||
"@ionic-native/network": "5.31.1",
|
"@ionic-native/network": "5.36.0",
|
||||||
"@ionic-native/splash-screen": "5.29.0",
|
"@ionic-native/splash-screen": "5.36.0",
|
||||||
"@ionic-native/status-bar": "5.29.0",
|
"@ionic-native/status-bar": "5.36.0",
|
||||||
"@ionic/angular": "5.6.9",
|
"@ionic/angular": "5.7.0",
|
||||||
"@ionic/storage": "2.2.0",
|
"@ionic/storage-angular": "3.0.6",
|
||||||
"@ngx-translate/core": "11.0.1",
|
"@ngx-translate/core": "11.0.1",
|
||||||
"@ngx-translate/http-loader": "4.0.0",
|
"@ngx-translate/http-loader": "4.0.0",
|
||||||
"@openstapps/api": "0.31.0",
|
"@openstapps/api": "0.32.0",
|
||||||
"@openstapps/configuration": "0.27.0",
|
"@openstapps/configuration": "0.28.1",
|
||||||
"@openstapps/core": "0.49.1",
|
"@openstapps/core": "0.51.0",
|
||||||
"cordova-android": "9.0.0",
|
"cordova-android": "9.0.0",
|
||||||
"cordova-browser": "6.0.0",
|
"cordova-browser": "6.0.0",
|
||||||
"cordova-ios": "6.2.0",
|
"cordova-ios": "6.2.0",
|
||||||
"cordova-plugin-androidx-adapter": "1.1.3",
|
"cordova-plugin-androidx-adapter": "1.1.3",
|
||||||
"cordova-plugin-device": "2.0.3",
|
"cordova-plugin-device": "2.0.3",
|
||||||
"cordova-plugin-dialogs": "2.0.2",
|
"cordova-plugin-dialogs": "2.0.2",
|
||||||
"cordova.plugins.diagnostic": "6.0.3",
|
|
||||||
"cordova-plugin-geolocation": "4.1.0",
|
"cordova-plugin-geolocation": "4.1.0",
|
||||||
"cordova-plugin-ionic-keyboard": "2.2.0",
|
"cordova-plugin-ionic-keyboard": "2.2.0",
|
||||||
"cordova-plugin-ionic-webview": "5.0.0",
|
"cordova-plugin-ionic-webview": "5.0.0",
|
||||||
"cordova-plugin-network-information": "2.0.2",
|
"cordova-plugin-network-information": "2.0.2",
|
||||||
"cordova-plugin-splashscreen": "6.0.0",
|
"cordova-plugin-splashscreen": "6.0.0",
|
||||||
"cordova-plugin-whitelist": "1.3.4",
|
"cordova-plugin-whitelist": "1.3.4",
|
||||||
|
"cordova.plugins.diagnostic": "6.0.3",
|
||||||
"core-js": "2.6.5",
|
"core-js": "2.6.5",
|
||||||
"deepmerge": "3.3.0",
|
"deepmerge": "3.3.0",
|
||||||
"form-data": "2.5.0",
|
"form-data": "2.5.0",
|
||||||
"geojson": "0.5.0",
|
"geojson": "0.5.0",
|
||||||
"leaflet": "1.4.0",
|
"leaflet": "1.7.1",
|
||||||
"leaflet.markercluster": "1.4.1",
|
"leaflet.markercluster": "1.5.1",
|
||||||
"lodash-es": "4.17.21",
|
"lodash-es": "4.17.21",
|
||||||
"moment": "2.29.1",
|
"moment": "2.29.1",
|
||||||
"ngx-logger": "4.1.9",
|
"ngx-logger": "4.1.9",
|
||||||
"ngx-markdown": "9.1.1",
|
"ngx-markdown": "12.0.1",
|
||||||
"ngx-moment": "5.0.0",
|
"ngx-moment": "5.0.0",
|
||||||
"opening_hours": "3.7.0",
|
"opening_hours": "3.7.0",
|
||||||
"rxjs": "6.6.3",
|
"rxjs": "6.6.3",
|
||||||
"tslib": "1.14.1",
|
"tslib": "2.0.0",
|
||||||
"zone.js": "0.11.4"
|
"zone.js": "0.11.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/architect": "0.901.13",
|
"@angular-devkit/architect": "0.1202.5",
|
||||||
"@angular-devkit/build-angular": "0.901.13",
|
"@angular-devkit/build-angular": "12.2.5",
|
||||||
"@angular-devkit/core": "9.1.12",
|
"@angular-devkit/core": "12.2.5",
|
||||||
"@angular-devkit/schematics": "9.1.12",
|
"@angular-devkit/schematics": "12.2.5",
|
||||||
"@angular-eslint/builder": "12.2.0",
|
"@angular-eslint/builder": "12.4.1",
|
||||||
"@angular-eslint/eslint-plugin": "12.2.0",
|
"@angular-eslint/eslint-plugin": "12.4.1",
|
||||||
"@angular-eslint/eslint-plugin-template": "12.2.0",
|
"@angular-eslint/eslint-plugin-template": "12.4.1",
|
||||||
"@angular-eslint/schematics": "1.2.0",
|
"@angular-eslint/schematics": "12.4.1",
|
||||||
"@angular-eslint/template-parser": "1.2.0",
|
"@angular-eslint/template-parser": "12.4.1",
|
||||||
"@angular/cli": "9.1.12",
|
"@angular/cli": "12.2.5",
|
||||||
"@angular/compiler": "9.1.13",
|
"@angular/compiler": "12.2.5",
|
||||||
"@angular/compiler-cli": "9.1.13",
|
"@angular/compiler-cli": "12.2.5",
|
||||||
"@angular/language-service": "9.1.13",
|
"@angular/language-service": "12.2.5",
|
||||||
"@compodoc/compodoc": "1.1.10",
|
"@compodoc/compodoc": "1.1.14",
|
||||||
"@ionic/angular-toolkit": "2.3.3",
|
"@ionic/angular-toolkit": "4.0.0",
|
||||||
"@types/deepmerge": "2.2.0",
|
"@types/deepmerge": "2.2.0",
|
||||||
"@types/form-data": "2.5.0",
|
"@types/form-data": "2.5.0",
|
||||||
"@types/jasmine": "3.3.12",
|
"@types/jasmine": "3.9.1",
|
||||||
"@types/jasminewd2": "2.0.6",
|
"@types/jasminewd2": "2.0.10",
|
||||||
"@types/leaflet": "1.4.4",
|
"@types/leaflet": "1.7.5",
|
||||||
"@types/leaflet.markercluster": "1.0.3",
|
"@types/leaflet.markercluster": "1.4.5",
|
||||||
"@types/lodash-es": "4.17.4",
|
"@types/lodash-es": "4.17.4",
|
||||||
"@types/node": "14.14.37",
|
"@types/node": "14.17.16",
|
||||||
"@typescript-eslint/eslint-plugin": "4.3.0",
|
"@typescript-eslint/eslint-plugin": "4.31.0",
|
||||||
"@typescript-eslint/parser": "4.3.0",
|
"@typescript-eslint/parser": "4.31.0",
|
||||||
"codelyzer": "5.1.2",
|
"conventional-changelog-cli": "2.1.1",
|
||||||
"conventional-changelog-cli": "2.0.12",
|
"eslint": "7.32.0",
|
||||||
"eslint": "7.30.0",
|
|
||||||
"eslint-config-prettier": "8.3.0",
|
"eslint-config-prettier": "8.3.0",
|
||||||
"eslint-plugin-jsdoc": "35.4.1",
|
"eslint-plugin-jsdoc": "36.1.0",
|
||||||
"eslint-plugin-prettier": "3.4.0",
|
"eslint-plugin-prettier": "4.0.0",
|
||||||
"eslint-plugin-unicorn": "34.0.1",
|
"eslint-plugin-unicorn": "36.0.0",
|
||||||
"is-docker": "1.1.0",
|
"is-docker": "1.1.0",
|
||||||
"jasmine-core": "3.5.0",
|
"jasmine-core": "3.9.0",
|
||||||
"jasmine-spec-reporter": "4.2.1",
|
"jasmine-spec-reporter": "7.0.0",
|
||||||
"karma": "4.4.1",
|
"karma": "6.3.4",
|
||||||
"karma-chrome-launcher": "3.1.0",
|
"karma-chrome-launcher": "3.1.0",
|
||||||
"karma-coverage-istanbul-reporter": "2.1.0",
|
"karma-coverage-istanbul-reporter": "3.0.3",
|
||||||
"karma-jasmine": "2.0.1",
|
"karma-jasmine": "4.0.1",
|
||||||
"karma-jasmine-html-reporter": "1.4.2",
|
"karma-jasmine-html-reporter": "1.7.0",
|
||||||
"karma-mocha-reporter": "2.2.5",
|
"karma-mocha-reporter": "2.2.5",
|
||||||
"prettier": "2.3.2",
|
"prettier": "2.4.0",
|
||||||
"protractor": "5.4.2",
|
"protractor": "7.0.0",
|
||||||
"surge": "0.21.3",
|
"surge": "0.23.0",
|
||||||
"ts-node": "8.0.3",
|
"ts-node": "8.0.3",
|
||||||
"typescript": "3.8.3"
|
"typescript": "4.3.5"
|
||||||
},
|
},
|
||||||
"cordova": {
|
"cordova": {
|
||||||
"plugins": {
|
"plugins": {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import {
|
|||||||
} from '@openstapps/core';
|
} from '@openstapps/core';
|
||||||
import {Observable, of} from 'rxjs';
|
import {Observable, of} from 'rxjs';
|
||||||
import {delay, map} from 'rxjs/operators';
|
import {delay, map} from 'rxjs/operators';
|
||||||
import {dependencies} from '../../../package.json';
|
import packageJson from '../../../package.json';
|
||||||
import {facetsMock} from './data/sample-facets';
|
import {facetsMock} from './data/sample-facets';
|
||||||
import {SampleThings} from './data/sample-things';
|
import {SampleThings} from './data/sample-things';
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ export const sampleIndexResponse: SCIndexResponse = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
backend: {
|
backend: {
|
||||||
SCVersion: dependencies['@openstapps/core'],
|
SCVersion: packageJson.dependencies['@openstapps/core'],
|
||||||
externalRequestTimeout: 5000,
|
externalRequestTimeout: 5000,
|
||||||
hiddenTypes: [
|
hiddenTypes: [
|
||||||
SCThingType.DateSeries,
|
SCThingType.DateSeries,
|
||||||
|
|||||||
@@ -22,6 +22,6 @@ const routes: Routes = [{path: '', redirectTo: '/news', pathMatch: 'full'}];
|
|||||||
*/
|
*/
|
||||||
@NgModule({
|
@NgModule({
|
||||||
exports: [RouterModule],
|
exports: [RouterModule],
|
||||||
imports: [RouterModule.forRoot(routes)],
|
imports: [RouterModule.forRoot(routes, {relativeLinkResolution: 'legacy'})],
|
||||||
})
|
})
|
||||||
export class AppRoutingModule {}
|
export class AppRoutingModule {}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
|
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
|
||||||
import {async, TestBed} from '@angular/core/testing';
|
import {TestBed, waitForAsync} from '@angular/core/testing';
|
||||||
|
|
||||||
import {SplashScreen} from '@ionic-native/splash-screen/ngx';
|
import {SplashScreen} from '@ionic-native/splash-screen/ngx';
|
||||||
import {StatusBar} from '@ionic-native/status-bar/ngx';
|
import {StatusBar} from '@ionic-native/status-bar/ngx';
|
||||||
@@ -38,7 +38,8 @@ describe('AppComponent', () => {
|
|||||||
let configProvider: jasmine.SpyObj<ConfigProvider>;
|
let configProvider: jasmine.SpyObj<ConfigProvider>;
|
||||||
let ngxLogger: jasmine.SpyObj<NGXLogger>;
|
let ngxLogger: jasmine.SpyObj<NGXLogger>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(
|
||||||
|
waitForAsync(() => {
|
||||||
statusBarSpy = jasmine.createSpyObj('StatusBar', ['styleDefault']);
|
statusBarSpy = jasmine.createSpyObj('StatusBar', ['styleDefault']);
|
||||||
splashScreenSpy = jasmine.createSpyObj('SplashScreen', ['hide']);
|
splashScreenSpy = jasmine.createSpyObj('SplashScreen', ['hide']);
|
||||||
platformReadySpy = Promise.resolve();
|
platformReadySpy = Promise.resolve();
|
||||||
@@ -72,7 +73,8 @@ describe('AppComponent', () => {
|
|||||||
],
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
it('should create the app', () => {
|
it('should create the app', () => {
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import {
|
|||||||
WrongConfigVersionInStorage,
|
WrongConfigVersionInStorage,
|
||||||
} from './errors';
|
} from './errors';
|
||||||
import {NGXLogger} from 'ngx-logger';
|
import {NGXLogger} from 'ngx-logger';
|
||||||
import {dependencies} from '../../../../package.json';
|
import packageJson from '../../../../package.json';
|
||||||
|
|
||||||
describe('ConfigProvider', () => {
|
describe('ConfigProvider', () => {
|
||||||
let configProvider: ConfigProvider;
|
let configProvider: ConfigProvider;
|
||||||
@@ -216,7 +216,7 @@ describe('ConfigProvider', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const scVersion = dependencies['@openstapps/core'];
|
const scVersion = packageJson.dependencies['@openstapps/core'];
|
||||||
|
|
||||||
const sampleIndexResponse: SCIndexResponse = {
|
const sampleIndexResponse: SCIndexResponse = {
|
||||||
app: {
|
app: {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {Injectable} from '@angular/core';
|
|||||||
import {Client} from '@openstapps/api/lib/client';
|
import {Client} from '@openstapps/api/lib/client';
|
||||||
import {SCAppConfiguration, SCIndexResponse} from '@openstapps/core';
|
import {SCAppConfiguration, SCIndexResponse} from '@openstapps/core';
|
||||||
import {NGXLogger} from 'ngx-logger';
|
import {NGXLogger} from 'ngx-logger';
|
||||||
import {dependencies} from '../../../../package.json';
|
import packageJson from '../../../../package.json';
|
||||||
import {environment} from '../../../environments/environment';
|
import {environment} from '../../../environments/environment';
|
||||||
import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider';
|
import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider';
|
||||||
import {StorageProvider} from '../storage/storage.provider';
|
import {StorageProvider} from '../storage/storage.provider';
|
||||||
@@ -63,7 +63,7 @@ export class ConfigProvider {
|
|||||||
/**
|
/**
|
||||||
* Version of the @openstapps/core package that app is using
|
* Version of the @openstapps/core package that app is using
|
||||||
*/
|
*/
|
||||||
scVersion = dependencies['@openstapps/core'];
|
scVersion = packageJson.dependencies['@openstapps/core'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor, initialise api client
|
* Constructor, initialise api client
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ describe('DataProvider', () => {
|
|||||||
});
|
});
|
||||||
storageProvider = TestBed.get(StorageProvider);
|
storageProvider = TestBed.get(StorageProvider);
|
||||||
dataProvider = TestBed.get(DataProvider);
|
dataProvider = TestBed.get(DataProvider);
|
||||||
await storageProvider.deleteAll();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should generate data key', async () => {
|
it('should generate data key', async () => {
|
||||||
@@ -165,6 +164,7 @@ describe('DataProvider', () => {
|
|||||||
);
|
);
|
||||||
const response = await dataProvider.multiSearch(request);
|
const response = await dataProvider.multiSearch(request);
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
expect(response).toEqual(responseShould);
|
expect(response).toEqual(responseShould);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {CUSTOM_ELEMENTS_SCHEMA, DebugElement} from '@angular/core';
|
import {CUSTOM_ELEMENTS_SCHEMA, DebugElement} from '@angular/core';
|
||||||
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
||||||
import {ActivatedRoute, RouterModule} from '@angular/router';
|
import {ActivatedRoute, RouterModule} from '@angular/router';
|
||||||
import {IonRefresher, IonTitle} from '@ionic/angular';
|
import {IonRefresher, IonTitle} from '@ionic/angular';
|
||||||
import {
|
import {
|
||||||
@@ -29,6 +29,7 @@ import {DataProvider} from '../data.provider';
|
|||||||
import {DataDetailComponent} from './data-detail.component';
|
import {DataDetailComponent} from './data-detail.component';
|
||||||
import {By} from '@angular/platform-browser';
|
import {By} from '@angular/platform-browser';
|
||||||
import {Observable, of} from 'rxjs';
|
import {Observable, of} from 'rxjs';
|
||||||
|
import {StorageProvider} from '../../storage/storage.provider';
|
||||||
|
|
||||||
const translations: any = {data: {detail: {TITLE: 'Foo'}}};
|
const translations: any = {data: {detail: {TITLE: 'Foo'}}};
|
||||||
|
|
||||||
@@ -62,20 +63,39 @@ describe('DataDetailComponent', () => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
beforeEach(async(() => {
|
const storageProviderSpy = jasmine.createSpyObj('StorageProvider', [
|
||||||
|
'init',
|
||||||
|
'get',
|
||||||
|
'has',
|
||||||
|
'put',
|
||||||
|
'search',
|
||||||
|
]);
|
||||||
|
|
||||||
|
beforeEach(
|
||||||
|
waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
RouterModule.forRoot([]),
|
RouterModule.forRoot([], {relativeLinkResolution: 'legacy'}),
|
||||||
DataRoutingModule,
|
DataRoutingModule,
|
||||||
DataModule,
|
DataModule,
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
loader: {provide: TranslateLoader, useClass: TranslateFakeLoader},
|
loader: {provide: TranslateLoader, useClass: TranslateFakeLoader},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
providers: [{provide: ActivatedRoute, useValue: fakeActivatedRoute}],
|
providers: [
|
||||||
|
{
|
||||||
|
provide: ActivatedRoute,
|
||||||
|
useValue: fakeActivatedRoute,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
provide: StorageProvider,
|
||||||
|
useValue: storageProviderSpy,
|
||||||
|
},
|
||||||
|
],
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
dataProvider = TestBed.get(DataProvider);
|
dataProvider = TestBed.get(DataProvider);
|
||||||
@@ -90,15 +110,12 @@ describe('DataDetailComponent', () => {
|
|||||||
detailPage = fixture.debugElement;
|
detailPage = fixture.debugElement;
|
||||||
translateService.use('foo');
|
translateService.use('foo');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
await dataProvider.deleteAll();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create component', () => expect(comp).toBeDefined());
|
it('should create component', () => expect(comp).toBeDefined());
|
||||||
|
|
||||||
it('should have appropriate title', async () => {
|
it('should have appropriate title', async () => {
|
||||||
const title: DebugElement | null = detailPage.query(By.directive(IonTitle));
|
const title: DebugElement = detailPage.query(By.directive(IonTitle));
|
||||||
// eslint-disable-next-line unicorn/no-null
|
|
||||||
expect(title).not.toBe(null);
|
|
||||||
expect(title!.nativeElement.textContent).toBe('Foo');
|
expect(title!.nativeElement.textContent).toBe('Foo');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
|
||||||
|
|
||||||
import {DataListComponent} from './data-list.component';
|
import {DataListComponent} from './data-list.component';
|
||||||
import {TranslateModule} from '@ngx-translate/core';
|
import {TranslateModule} from '@ngx-translate/core';
|
||||||
@@ -10,7 +10,8 @@ describe('DataListComponent', () => {
|
|||||||
let fixture: ComponentFixture<DataListComponent>;
|
let fixture: ComponentFixture<DataListComponent>;
|
||||||
let configProviderMock: jasmine.SpyObj<ConfigProvider>;
|
let configProviderMock: jasmine.SpyObj<ConfigProvider>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(
|
||||||
|
waitForAsync(() => {
|
||||||
configProviderMock = jasmine.createSpyObj('ConfigProvider', {
|
configProviderMock = jasmine.createSpyObj('ConfigProvider', {
|
||||||
getValue: () => Promise.resolve({lat: 123, lng: 123}),
|
getValue: () => Promise.resolve({lat: 123, lng: 123}),
|
||||||
});
|
});
|
||||||
@@ -20,7 +21,8 @@ describe('DataListComponent', () => {
|
|||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
providers: [{provide: ConfigProvider, useValue: configProviderMock}],
|
providers: [{provide: ConfigProvider, useValue: configProviderMock}],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(DataListComponent);
|
fixture = TestBed.createComponent(DataListComponent);
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import {Point, Polygon} from 'geojson';
|
|||||||
import {divIcon, geoJSON, icon, LatLng, Map, marker, Marker} from 'leaflet';
|
import {divIcon, geoJSON, icon, LatLng, Map, marker, Marker} from 'leaflet';
|
||||||
import {DataProvider} from '../data/data.provider';
|
import {DataProvider} from '../data/data.provider';
|
||||||
import {MapPosition, PositionService} from './position.service';
|
import {MapPosition, PositionService} from './position.service';
|
||||||
import Timeout = NodeJS.Timeout;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides methods for presenting the map
|
* Provides methods for presenting the map
|
||||||
@@ -91,7 +90,7 @@ export class MapProvider {
|
|||||||
static invalidateWhenRendered = (
|
static invalidateWhenRendered = (
|
||||||
map: Map,
|
map: Map,
|
||||||
element: ElementRef,
|
element: ElementRef,
|
||||||
interval: Timeout,
|
interval: number,
|
||||||
) => {
|
) => {
|
||||||
if (element.nativeElement.offsetWidth === 0) {
|
if (element.nativeElement.offsetWidth === 0) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ import {
|
|||||||
} from '../position.service';
|
} from '../position.service';
|
||||||
import {MapListModalComponent} from './modals/map-list-modal.component';
|
import {MapListModalComponent} from './modals/map-list-modal.component';
|
||||||
import {MapSingleModalComponent} from './modals/map-single-modal.component';
|
import {MapSingleModalComponent} from './modals/map-single-modal.component';
|
||||||
import Timeout = NodeJS.Timeout;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main page of the map
|
* The main page of the map
|
||||||
@@ -324,7 +323,7 @@ export class MapPageComponent {
|
|||||||
*/
|
*/
|
||||||
async onMapReady(map: Map) {
|
async onMapReady(map: Map) {
|
||||||
this.map = map;
|
this.map = map;
|
||||||
const interval: Timeout = setInterval(() =>
|
const interval = window.setInterval(() =>
|
||||||
MapProvider.invalidateWhenRendered(map, this.mapContainer, interval),
|
MapProvider.invalidateWhenRendered(map, this.mapContainer, interval),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import {Component, ElementRef, Input, OnInit, ViewChild} from '@angular/core';
|
|||||||
import {SCPlace} from '@openstapps/core';
|
import {SCPlace} from '@openstapps/core';
|
||||||
import {geoJSON, Map, MapOptions, tileLayer} from 'leaflet';
|
import {geoJSON, Map, MapOptions, tileLayer} from 'leaflet';
|
||||||
import {MapProvider} from '../map.provider';
|
import {MapProvider} from '../map.provider';
|
||||||
import Timeout = NodeJS.Timeout;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The map widget (needs a container with explicit size)
|
* The map widget (needs a container with explicit size)
|
||||||
@@ -77,7 +76,7 @@ export class MapWidgetComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
onMapReady(map: Map) {
|
onMapReady(map: Map) {
|
||||||
this.map = map;
|
this.map = map;
|
||||||
const interval: Timeout = setInterval(() => {
|
const interval = window.setInterval(() => {
|
||||||
MapProvider.invalidateWhenRendered(map, this.mapContainer, interval);
|
MapProvider.invalidateWhenRendered(map, this.mapContainer, interval);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ describe('ContextMenuComponent', async () => {
|
|||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
CommonModule,
|
CommonModule,
|
||||||
SettingsModule,
|
SettingsModule,
|
||||||
RouterModule.forRoot([]),
|
RouterModule.forRoot([], {relativeLinkResolution: 'legacy'}),
|
||||||
],
|
],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export class ScheduleProvider implements OnDestroy {
|
|||||||
private _uuidSubscription?: Subscription;
|
private _uuidSubscription?: Subscription;
|
||||||
|
|
||||||
constructor(private readonly dataProvider: DataProvider) {
|
constructor(private readonly dataProvider: DataProvider) {
|
||||||
window.addEventListener('storage', this.storageEventListener.bind(this));
|
window.addEventListener('storage', this.storageListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -87,9 +87,9 @@ export class ScheduleProvider implements OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listen to updates in local storage
|
* What to do when local storage updates
|
||||||
*/
|
*/
|
||||||
private storageEventListener(event: StorageEvent) {
|
private storageEventHandler(event: StorageEvent) {
|
||||||
if (
|
if (
|
||||||
event.newValue &&
|
event.newValue &&
|
||||||
event.storageArea === localStorage &&
|
event.storageArea === localStorage &&
|
||||||
@@ -99,6 +99,11 @@ export class ScheduleProvider implements OnDestroy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Listen to updates in local storage
|
||||||
|
*/
|
||||||
|
private storageListener = this.storageEventHandler.bind(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load Date Series
|
* Load Date Series
|
||||||
*/
|
*/
|
||||||
@@ -192,6 +197,6 @@ export class ScheduleProvider implements OnDestroy {
|
|||||||
*/
|
*/
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this._uuidSubscription?.unsubscribe();
|
this._uuidSubscription?.unsubscribe();
|
||||||
window.removeEventListener('storage', this.storageEventListener.bind(this));
|
window.removeEventListener('storage', this.storageListener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ describe('SettingsProvider', () => {
|
|||||||
CONFIG_SETTINGS_MOCK[3].categories[0],
|
CONFIG_SETTINGS_MOCK[3].categories[0],
|
||||||
CONFIG_SETTINGS_MOCK[3].name,
|
CONFIG_SETTINGS_MOCK[3].name,
|
||||||
);
|
);
|
||||||
await expect(value).toEqual(SETTING_VALUES_MOCK.profile.group);
|
await expect(value).toEqual(SETTING_VALUES_MOCK.profile.group as string);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should set default setting value if no persisted value exist', async () => {
|
it('should set default setting value if no persisted value exist', async () => {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {IonicStorageModule} from '@ionic/storage';
|
import {IonicStorageModule} from '@ionic/storage-angular';
|
||||||
import {StorageProvider} from './storage.provider';
|
import {StorageProvider} from './storage.provider';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -48,10 +48,10 @@ describe('StorageProvider', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should call ready method of storage on init', () => {
|
it('should call ready method of storage on init', () => {
|
||||||
spyOn(storage, 'ready');
|
spyOn(storage, 'create');
|
||||||
storageProvider.init();
|
storageProvider.init();
|
||||||
|
|
||||||
expect(storage.ready).toHaveBeenCalled();
|
expect(storage.create).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call set method of storage to put a value', () => {
|
it('should call set method of storage to put a value', () => {
|
||||||
|
|||||||
@@ -102,8 +102,8 @@ export class StorageProvider {
|
|||||||
/**
|
/**
|
||||||
* Initializes the storage (waits until it's ready)
|
* Initializes the storage (waits until it's ready)
|
||||||
*/
|
*/
|
||||||
async init(): Promise<any> {
|
async init(): Promise<void> {
|
||||||
return this.storage.ready();
|
await this.storage.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ import {LangChangeEvent, TranslateService} from '@ngx-translate/core';
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import {Subscription} from 'rxjs';
|
import {Subscription} from 'rxjs';
|
||||||
import {logger} from '../_helpers/ts-logger';
|
import {logger} from '../_helpers/ts-logger';
|
||||||
|
// TODO: use import for opening_hours when the change is published with a new update
|
||||||
|
// see https://github.com/opening-hours/opening_hours.js/pull/407
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires, unicorn/prefer-module
|
// eslint-disable-next-line @typescript-eslint/no-var-requires, unicorn/prefer-module
|
||||||
const ohFunction = require('opening_hours');
|
const ohFunction = require('opening_hours');
|
||||||
|
|
||||||
|
|||||||
@@ -29,4 +29,4 @@ export const environment = {
|
|||||||
* import the following file, but please comment it out in production mode
|
* import the following file, but please comment it out in production mode
|
||||||
* because it will have performance impact when throw error
|
* because it will have performance impact when throw error
|
||||||
*/
|
*/
|
||||||
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ import 'core-js/es7/reflect';
|
|||||||
/***************************************************************************************************
|
/***************************************************************************************************
|
||||||
* Zone JS is required by Angular itself.
|
* Zone JS is required by Angular itself.
|
||||||
*/
|
*/
|
||||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
import 'zone.js'; // Included with Angular CLI.
|
||||||
|
|
||||||
/***************************************************************************************************
|
/***************************************************************************************************
|
||||||
* APPLICATION IMPORTS
|
* APPLICATION IMPORTS
|
||||||
|
|||||||
+1
-2
@@ -13,13 +13,12 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||||
|
import 'zone.js/testing';
|
||||||
import {getTestBed} from '@angular/core/testing';
|
import {getTestBed} from '@angular/core/testing';
|
||||||
import {
|
import {
|
||||||
BrowserDynamicTestingModule,
|
BrowserDynamicTestingModule,
|
||||||
platformBrowserDynamicTesting,
|
platformBrowserDynamicTesting,
|
||||||
} from '@angular/platform-browser-dynamic/testing';
|
} from '@angular/platform-browser-dynamic/testing';
|
||||||
import 'zone.js/dist/zone-testing';
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
declare const require: any;
|
declare const require: any;
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../out-tsc/spec",
|
|
||||||
"baseUrl": "./"
|
|
||||||
,
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"test.ts"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"polyfills.ts",
|
|
||||||
"**/*.spec.ts",
|
|
||||||
"**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
{
|
{
|
||||||
"extends": "../tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../out-tsc/app",
|
"outDir": "../out-tsc/app",
|
||||||
"baseUrl": "./"
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"main.ts",
|
"src/main.ts",
|
||||||
"polyfills.ts"
|
"src/polyfills.ts"
|
||||||
],
|
],
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.d.ts"
|
"src/**/*.d.ts"
|
||||||
+6
-2
@@ -2,14 +2,18 @@
|
|||||||
"extends": "./node_modules/@openstapps/configuration/tsconfig.json",
|
"extends": "./node_modules/@openstapps/configuration/tsconfig.json",
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"baseUrl": "./",
|
||||||
"outDir": "./dist/out-tsc",
|
"outDir": "./dist/out-tsc",
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"strictPropertyInitialization": false,
|
"strictPropertyInitialization": false,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
|
"downlevelIteration": true,
|
||||||
|
"importHelpers": true,
|
||||||
|
"module": "es2020",
|
||||||
"lib": [
|
"lib": [
|
||||||
"es2017",
|
"es2018",
|
||||||
"dom"
|
"dom"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../out-tsc/spec",
|
||||||
|
"baseUrl": "./",
|
||||||
|
"types": [
|
||||||
|
"jasmine",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/test.ts"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"src/polyfills.ts",
|
||||||
|
"**/*.spec.ts",
|
||||||
|
"**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user