Debugging configruation and merge with latest angular

This commit is contained in:
ziajka 2018-11-27 11:26:23 +01:00
parent 81f9a65617
commit b83d2c8efd
8 changed files with 73 additions and 49 deletions

View File

@ -1,4 +1,4 @@
# Editor configuration, see http://editorconfig.org # Editor configuration, see https://editorconfig.org
root = true root = true
[*] [*]

16
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch localhost",
"type": "firefox",
"request": "launch",
"reAttach": true,
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}"
}
]
}

View File

@ -1,10 +1,18 @@
// The file contents for the current environment will overwrite these during build. // This file can be replaced during build by using the `fileReplacements` array.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of file replacements can be found in `angular.json`.
// The list of which env maps to which file can be found in `.angular-cli.json`.
export const environment = { export const environment = {
production: false, production: false,
electron: false, electron: false,
githubio: false githubio: false
}; };
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.

View File

@ -8,4 +8,5 @@ if (environment.production) {
enableProdMode(); enableProdMode();
} }
platformBrowserDynamic().bootstrapModule(AppModule); platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));

View File

@ -11,7 +11,7 @@
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
* *
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html * Learn more in https://angular.io/guide/browser-support
*/ */
/*************************************************************************************************** /***************************************************************************************************
@ -34,29 +34,47 @@
// import 'core-js/es6/weak-map'; // import 'core-js/es6/weak-map';
// import 'core-js/es6/set'; // import 'core-js/es6/set';
/**
* If the application will be indexed by Google Search, the following is required.
* Googlebot uses a renderer based on Chrome 41.
* https://developers.google.com/search/docs/guides/rendering
**/
// import 'core-js/es6/array';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */ /** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`. // import 'classlist.js'; // Run `npm install --save classlist.js`.
/** Evergreen browsers require these. **/ /** IE10 and IE11 requires the following for the Reflect API. */
import 'core-js/es6/reflect'; // import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
/** /**
* Required to support Web Animations `@angular/animation`. * Web Animations `@angular/platform-browser/animations`
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
**/ **/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`. // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
*/
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
/*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
// (window as any).__Zone_enable_cross_context_check = true;
/*************************************************************************************************** /***************************************************************************************************
* Zone JS is required by Angular itself. * Zone JS is required by default for Angular itself.
*/ */
import 'zone.js/dist/zone'; // Included with Angular CLI. import 'zone.js/dist/zone'; // Included with Angular CLI.
/*************************************************************************************************** /***************************************************************************************************
* APPLICATION IMPORTS * APPLICATION IMPORTS
*/ */

View File

@ -1,24 +1,14 @@
// 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/dist/long-stack-trace-zone'; import 'zone.js/dist/zone-testing';
import 'zone.js/dist/proxy.js';
import 'zone.js/dist/sync-test';
import 'zone.js/dist/jasmine-patch';
import 'zone.js/dist/async-test';
import 'zone.js/dist/fake-async-test';
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';
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
declare const __karma__: any;
declare const require: any; declare const require: any;
// Prevent Karma from running prematurely.
__karma__.loaded = function () {};
// First, initialize the Angular testing environment. // First, initialize the Angular testing environment.
getTestBed().initTestEnvironment( getTestBed().initTestEnvironment(
BrowserDynamicTestingModule, BrowserDynamicTestingModule,
@ -28,5 +18,3 @@ getTestBed().initTestEnvironment(
const context = require.context('./', true, /\.spec\.ts$/); const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules. // And load the modules.
context.keys().map(context); context.keys().map(context);
// Finally, start Karma to run the tests.
__karma__.start();

View File

@ -1,18 +1,21 @@
{ {
"compileOnSave": false, "compileOnSave": false,
"compilerOptions": { "compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc", "outDir": "./dist/out-tsc",
"sourceMap": true, "sourceMap": true,
"declaration": false, "declaration": false,
"module": "es2015",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"importHelpers": true,
"target": "es5", "target": "es5",
"typeRoots": [ "typeRoots": [
"node_modules/@types" "node_modules/@types"
], ],
"lib": [ "lib": [
"es2016", "es2018",
"dom" "dom"
], ],
}, },

View File

@ -11,10 +11,14 @@
"check-space" "check-space"
], ],
"curly": true, "curly": true,
"deprecation": {
"severity": "warn"
},
"eofline": true, "eofline": true,
"forin": true, "forin": true,
"import-blacklist": [ "import-blacklist": [
true true,
"rxjs/Rx"
], ],
"import-spacing": true, "import-spacing": true,
"indent": [ "indent": [
@ -61,11 +65,12 @@
], ],
"no-misused-new": true, "no-misused-new": true,
"no-non-null-assertion": true, "no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-shadowed-variable": true, "no-shadowed-variable": true,
"no-string-literal": false, "no-string-literal": false,
"no-string-throw": true, "no-string-throw": true,
"no-switch-case-fall-through": true, "no-switch-case-fall-through": true,
"no-trailing-whitespace": false, "no-trailing-whitespace": true,
"no-unnecessary-initializer": true, "no-unnecessary-initializer": true,
"no-unused-expression": true, "no-unused-expression": true,
"no-use-before-declare": true, "no-use-before-declare": true,
@ -80,7 +85,7 @@
], ],
"prefer-const": true, "prefer-const": true,
"quotemark": [ "quotemark": [
false, true,
"single" "single"
], ],
"radix": true, "radix": true,
@ -102,7 +107,6 @@
"variable-declaration": "nospace" "variable-declaration": "nospace"
} }
], ],
"typeof-compare": true,
"unified-signatures": true, "unified-signatures": true,
"variable-name": false, "variable-name": false,
"whitespace": [ "whitespace": [
@ -113,18 +117,7 @@
"check-separator", "check-separator",
"check-type" "check-type"
], ],
"directive-selector": [ "no-output-on-prefix": true,
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
],
"use-input-property-decorator": true, "use-input-property-decorator": true,
"use-output-property-decorator": true, "use-output-property-decorator": true,
"use-host-property-decorator": true, "use-host-property-decorator": true,
@ -133,9 +126,6 @@
"use-life-cycle-interface": true, "use-life-cycle-interface": true,
"use-pipe-transform-interface": true, "use-pipe-transform-interface": true,
"component-class-suffix": true, "component-class-suffix": true,
"directive-class-suffix": true, "directive-class-suffix": true
"no-access-missing-member": true,
"templates-use-public": true,
"invoke-injectable": true
} }
} }