Skip to content

Commit

Permalink
feat(demo): update demo app to Angular CLI 1.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tinesoft committed Mar 20, 2018
1 parent ca19b0b commit 68804ba
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/templates/demo/_README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# <%= projectName %>-demo

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.6.8.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.3.

## Development server

Expand Down
4 changes: 2 additions & 2 deletions app/templates/demo/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"@ng-bootstrap/ng-bootstrap": "1.0.0",
"@ng-bootstrap/ng-bootstrap": "1.0.2",
"bootstrap": "4.0.0",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
Expand All @@ -33,7 +33,7 @@
"@angular/platform-server": "^5.2.0"
},
"devDependencies": {
"@angular/cli": "1.6.8",
"@angular/cli": "1.7.3",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
"@angularclass/hmr": "~2.1.3",
Expand Down
13 changes: 13 additions & 0 deletions app/templates/demo/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,20 @@ import 'core-js/es7/reflect';
**/
// 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 default for Angular itself.
Expand Down
14 changes: 1 addition & 13 deletions app/templates/demo/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
// 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/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 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} 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;

// Prevent Karma from running prematurely.
__karma__.loaded = function () {};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
Expand All @@ -28,5 +18,3 @@ getTestBed().initTestEnvironment(
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
// Finally, start Karma to run the tests.
__karma__.start();

0 comments on commit 68804ba

Please sign in to comment.