Skip to content

Commit

Permalink
update to latest ng 5.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lathonez committed Dec 4, 2017
1 parent 093eaf6 commit ccea6f5
Show file tree
Hide file tree
Showing 14 changed files with 82 additions and 98 deletions.
9 changes: 6 additions & 3 deletions .angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@
},
"lint": [
{
"project": "src/tsconfig.app.json"
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "src/tsconfig.spec.json"
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json"
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}
],
"test": {
Expand Down
15 changes: 2 additions & 13 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
Expand All @@ -15,25 +15,14 @@ module.exports = function (config) {
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
files: [
{ pattern: './src/test.ts', watched: false }
],
preprocessors: {
'./src/test.ts': ['@angular/cli']
},
mime: {
'text/x-typescript': ['ts','tsx']
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['progress', 'coverage-istanbul']
: ['progress', 'kjhtml'],
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand Down
47 changes: 24 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,41 @@
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"gh-pages": "ng build --prod --base-href \"http://lathonez.com/angular2-signaturepad-demo/\" && angular-cli-ghpages"
"deploy": "ng build --prod --base-href \"http://lathonez.com/angular2-signaturepad-demo/\" && ngh"
},
"private": true,
"dependencies": {
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@angular/router": "4.0.0",
"@angular/common": "5.0.5",
"@angular/compiler": "5.0.5",
"@angular/core": "5.0.5",
"@angular/forms": "5.0.5",
"@angular/http": "5.0.5",
"@angular/platform-browser": "5.0.5",
"@angular/platform-browser-dynamic": "5.0.5",
"@angular/router": "5.0.5",
"angular2-signaturepad": "2.6.0",
"core-js": "2.4.1",
"rxjs": "5.1.0",
"zone.js": "0.8.4"
"rxjs": "5.5.2",
"zone.js": "0.8.14"
},
"devDependencies": {
"@angular/cli": "1.2.6",
"@angular/compiler-cli": "4.0.0",
"@types/jasmine": "2.5.38",
"@angular/cli": "1.5.5",
"@angular/compiler-cli": "5.0.5",
"@types/jasmine": "2.5.53",
"@types/node": "6.0.60",
"codelyzer": "2.0.0",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.4.1",
"angular-cli-ghpages": "0.5.2",
"codelyzer": "4.0.1",
"jasmine-core": "2.6.2",
"jasmine-spec-reporter": "4.1.0",
"karma": "1.7.0",
"karma-chrome-launcher": "2.1.1",
"karma-cli": "1.0.1",
"karma-coverage-istanbul-reporter": "1.2.1",
"karma-jasmine": "1.1.0",
"karma-jasmine-html-reporter": "0.2.2",
"karma-coverage-istanbul-reporter": "0.2.0",
"protractor": "5.1.0",
"ts-node": "2.0.0",
"tslint": "4.5.0",
"typescript": "2.2.0"
"protractor": "5.1.2",
"ts-node": "3.2.0",
"tslint": "5.7.0",
"typescript": "2.4.2"
}
}
11 changes: 3 additions & 8 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { TestBed, async } from '@angular/core/testing';

import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
Expand All @@ -10,23 +8,20 @@ describe('AppComponent', () => {
],
}).compileComponents();
}));

it('should create the app', async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
}));

it(`should have as title 'app works!'`, async(() => {
it(`should have as title 'app'`, async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('app works!');
expect(app.title).toEqual('app');
}));

it('should render title in a h1 tag', async(() => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1').textContent).toContain('app works!');
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
}));
});
3 changes: 0 additions & 3 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { SignatureFieldComponent } from "./signature-field/signature-field.compo
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})

export class AppComponent {

public title = 'angular2-signaturepad-demo';
Expand All @@ -28,8 +27,6 @@ export class AppComponent {
signatureField2: ['', Validators.required],
signatureField3: ['', Validators.required]
});

window['app'] = this;
}

public ngAfterViewInit() {
Expand Down
4 changes: 2 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>SignaturepadDemo</title>
Expand All @@ -9,6 +9,6 @@
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root>Loading...</app-root>
<app-root></app-root>
</body>
</html>
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ if (environment.production) {
enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule);
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.log(err));
20 changes: 9 additions & 11 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,31 @@
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following to support `@angular/animation`. */
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';


/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';


/** ALL Firefox browsers require the following to support `@angular/animation`. **/
/**
* Required to support Web Animations `@angular/platform-browser/animations`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.



/***************************************************************************************************
* 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.

Expand All @@ -60,9 +64,3 @@ import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

/**
* Date, currency, decimal and percent pipes.
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
*/
// import 'intl'; // Run `npm install --save intl`.
4 changes: 2 additions & 2 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
} from '@angular/platform-browser-dynamic/testing';

// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
declare var __karma__: any;
declare var require: any;
declare const __karma__: any;
declare const require: any;

// Prevent Karma from running prematurely.
__karma__.loaded = function () {};
Expand Down
13 changes: 2 additions & 11 deletions src/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"lib": [
"es2016",
"dom"
],
"outDir": "../out-tsc/app",
"baseUrl": "./",
"module": "es2015",
"baseUrl": "",
"types": []
},
"exclude": [
Expand Down
14 changes: 4 additions & 10 deletions src/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016"
],
"outDir": "../out-tsc/spec",
"baseUrl": "./",
"module": "commonjs",
"target": "es5",
"baseUrl": "",
"types": [
"jasmine",
"node"
Expand All @@ -21,6 +14,7 @@
"test.ts"
],
"include": [
"**/*.spec.ts"
"**/*.spec.ts",
"**/*.d.ts"
]
}
5 changes: 3 additions & 2 deletions src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* SystemJS module definition */
declare var module: {
declare var module: NodeModule;
interface NodeModule {
id: string;
};
}
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
Expand All @@ -13,7 +12,7 @@
"node_modules/@types"
],
"lib": [
"es2016",
"es2017",
"dom"
]
}
Expand Down
Loading

0 comments on commit ccea6f5

Please sign in to comment.