Skip to content

Commit 6328439

Browse files
IlyaSurmayvalorkin
authored andcommitted
fix(demo): update dependencies, fix aot build (#902)
* chore(deps): update dependencies * fix(demo): fix aot build
1 parent 3afaf63 commit 6328439

15 files changed

+75
-104
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ npm-debug.log
2121
# ignore build and dist for now
2222
/dist
2323
/temp
24+
.tmp
2425
/demo/dist
2526
/demo/temp
2627
/logs

angular-cli.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
],
2020
"scripts": [
2121
],
22+
"environmentSource": "environments/environment.ts",
2223
"environments": {
23-
"source": "environments/environment.ts",
2424
"dev": "environments/environment.ts",
2525
"prod": "environments/environment.prod.ts"
2626
}

demo/src/app/app.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
22
import { FormsModule } from '@angular/forms';
33
import { BrowserModule } from '@angular/platform-browser';
44
import { CommonModule } from '@angular/common';
5-
import { TabsModule, ButtonsModule } from 'ng2-bootstrap';
5+
import { TabsModule, ButtonsModule } from 'ngx-bootstrap';
66

77
import { SelectModule } from 'ng2-select';
88
import { AppComponent } from './app.component';

demo/src/app/components/select/children-demo.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h3>Select a city by country</h3>
1414
<button type="button" class="btn btn-primary"
1515
[(ngModel)]="disabledV" btnCheckbox
1616
btnCheckboxTrue="1" btnCheckboxFalse="0">
17-
{{disabled === '1' ? 'Enable' : 'Disable'}}
17+
{{disabled ? 'Enable' : 'Disable'}}
1818
</button>
1919
</div>
2020
</div>

demo/src/app/components/select/children-demo.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,15 @@ export class ChildrenDemoComponent {
181181
]
182182
}
183183
];
184-
private value:any = {};
185-
private _disabledV:string = '0';
186-
private disabled:boolean = false;
184+
public value:any = {};
185+
public _disabledV:string = '0';
186+
public disabled:boolean = false;
187187

188-
private get disabledV():string {
188+
public get disabledV():string {
189189
return this._disabledV;
190190
}
191191

192-
private set disabledV(value:string) {
192+
public set disabledV(value:string) {
193193
this._disabledV = value;
194194
this.disabled = this._disabledV === '1';
195195
}

demo/src/app/components/select/multiple-demo.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h3>Select multiple cities</h3>
1212
<button type="button" class="btn btn-primary"
1313
[(ngModel)]="disabledV" btnCheckbox
1414
btnCheckboxTrue="1" btnCheckboxFalse="0">
15-
{{disabled === '1' ? 'Enable' : 'Disable'}}
15+
{{disabled ? 'Enable' : 'Disable'}}
1616
</button>
1717
</div>
1818
</div>

demo/src/app/components/select/multiple-demo.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ export class MultipleDemoComponent {
1515
'Sofia', 'Stockholm', 'Stuttgart', 'The Hague', 'Turin', 'Valencia', 'Vienna',
1616
'Vilnius', 'Warsaw', 'Wrocław', 'Zagreb', 'Zaragoza'];
1717

18-
private value:any = ['Athens'];
19-
private _disabledV:string = '0';
20-
private disabled:boolean = false;
18+
public value:any = ['Athens'];
19+
public _disabledV:string = '0';
20+
public disabled:boolean = false;
2121

22-
private get disabledV():string {
22+
public get disabledV():string {
2323
return this._disabledV;
2424
}
2525

26-
private set disabledV(value:string) {
26+
public set disabledV(value:string) {
2727
this._disabledV = value;
2828
this.disabled = this._disabledV === '1';
2929
}

demo/src/app/components/select/rich-demo.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h3>Select a color</h3>
1515
<button type="button" class="btn btn-primary"
1616
[(ngModel)]="disabledV" btnCheckbox
1717
btnCheckboxTrue="1" btnCheckboxFalse="0">
18-
{{disabled === '1' ? 'Enable' : 'Disable'}}
18+
{{disabled ? 'Enable' : 'Disable'}}
1919
</button>
2020
</div>
2121
</div>

demo/src/app/components/select/rich-demo.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ const COLORS = [
5050
encapsulation: ViewEncapsulation.None // Enable dynamic HTML styles
5151
})
5252
export class RichDemoComponent implements OnInit {
53-
private value:any = {};
54-
private _disabledV:string = '0';
55-
private disabled:boolean = false;
56-
private items:Array<any> = [];
53+
public value:any = {};
54+
public _disabledV:string = '0';
55+
public disabled:boolean = false;
56+
public items:Array<any> = [];
5757

5858
public ngOnInit():any {
5959
COLORS.forEach((color:{name:string, hex:string}) => {
@@ -64,11 +64,11 @@ export class RichDemoComponent implements OnInit {
6464
});
6565
}
6666

67-
private get disabledV():string {
67+
public get disabledV():string {
6868
return this._disabledV;
6969
}
7070

71-
private set disabledV(value:string) {
71+
public set disabledV(value:string) {
7272
this._disabledV = value;
7373
this.disabled = this._disabledV === '1';
7474
}

demo/src/app/components/select/single-demo.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h3>Select a single city</h3>
1515
<button type="button" class="btn btn-primary"
1616
[(ngModel)]="disabledV" btnCheckbox
1717
btnCheckboxTrue="1" btnCheckboxFalse="0">
18-
{{disabled === '1' ? 'Enable' : 'Disable'}}
18+
{{disabled ? 'Enable' : 'Disable'}}
1919
</button>
2020
</div>
2121
</div>

demo/src/app/components/select/single-demo.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ export class SingleDemoComponent {
1616
'The Hague', 'Turin', 'Valencia', 'Vienna', 'Vilnius', 'Warsaw', 'Wrocław',
1717
'Zagreb', 'Zaragoza', 'Łódź'];
1818

19-
private value:any = {};
20-
private _disabledV:string = '0';
21-
private disabled:boolean = false;
19+
public value:any = {};
20+
public _disabledV:string = '0';
21+
public disabled:boolean = false;
2222

23-
private get disabledV():string {
23+
public get disabledV():string {
2424
return this._disabledV;
2525
}
2626

27-
private set disabledV(value:string) {
27+
public set disabledV(value:string) {
2828
this._disabledV = value;
2929
this.disabled = this._disabledV === '1';
3030
}

demo/src/typings.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ declare const ENV:string;
66
// google code-prettify
77
declare const PR:any;
88

9-
declare const require:any;
10-
declare const global:any;
9+
// declare const require:any;
10+
// declare const global:any;
1111

1212
declare module jasmine {
13-
interface Matchers {
13+
interface Matchers<T> {
1414
toHaveCssClass(expected: any): boolean;
1515
}
1616
}

karma.conf.js

+16-46
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,31 @@ const customLaunchers = require('./scripts/sauce-browsers').customLaunchers;
66
module.exports = function (config) {
77
const configuration = {
88
basePath: '',
9-
frameworks: ['jasmine', 'angular-cli'],
9+
frameworks: ['jasmine', '@angular/cli'],
1010
plugins: [
1111
require('karma-jasmine'),
1212
require('karma-chrome-launcher'),
13-
require('karma-remap-istanbul'),
14-
require('angular-cli/plugins/karma')
13+
require('karma-jasmine-html-reporter'),
14+
require('karma-coverage-istanbul-reporter'),
15+
require('@angular/cli/plugins/karma'),
16+
require('karma-sauce-launcher')
1517
],
1618
files: [
1719
{pattern: './scripts/test.ts', watched: false}
1820
],
1921
preprocessors: {
20-
'./scripts/test.ts': ['angular-cli']
22+
'./scripts/test.ts': ['@angular/cli']
2123
},
22-
remapIstanbulReporter: {
23-
reports: {
24-
html: 'coverage',
25-
lcovonly: './coverage/coverage.lcov'
26-
}
24+
coverageIstanbulReporter: {
25+
reports: ['html', 'lcovonly'],
26+
fixWebpackSourcePaths: true
2727
},
2828
angularCli: {
29-
config: './angular-cli.json',
3029
environment: 'dev'
3130
},
3231
reporters: config.angularCli && config.angularCli.codeCoverage
33-
? ['dots', 'karma-remap-istanbul']
34-
: ['dots'],
32+
? ['dots', 'coverage-istanbul']
33+
: ['dots', 'kjhtml'],
3534
port: 9876,
3635
colors: true,
3736
logLevel: config.LOG_INFO,
@@ -40,45 +39,16 @@ module.exports = function (config) {
4039
singleRun: false,
4140
customLaunchers: {
4241
Chrome_travis_ci: {
43-
base: 'Chrome',
44-
flags: ['--no-sandbox']
42+
base: 'ChromeHeadless',
43+
flags: ['--disable-translate', '--disable-extensions']
4544
}
4645
},
47-
mime: { 'text/x-typescript': ['ts','tsx'] },
48-
client: { captureConsole: true }
46+
mime: {'text/x-typescript': ['ts', 'tsx']},
47+
client: {captureConsole: true, clearContext: false}
4948
};
5049

5150
if (process.env.TRAVIS) {
52-
configuration.browsers = ['Chrome_travis_ci'];
53-
}
54-
55-
if (process.env.SAUCE) {
56-
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
57-
console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.');
58-
process.exit(1);
59-
}
60-
61-
configuration.plugins.push(require('karma-sauce-launcher'));
62-
configuration.reporters.push('saucelabs');
63-
configuration.sauceLabs = {
64-
verbose: true,
65-
testName: 'ng2-bootstrap unit tests',
66-
recordScreenshots: false,
67-
username: process.env.SAUCE_USERNAME,
68-
accessKey: process.env.SAUCE_ACCESS_KEY,
69-
connectOptions: {
70-
port: 5757,
71-
logfile: 'sauce_connect.log'
72-
},
73-
public: 'public'
74-
};
75-
configuration.captureTimeout = 0;
76-
configuration.customLaunchers = customLaunchers();
77-
configuration.browsers = Object.keys(configuration.customLaunchers);
78-
configuration.concurrency = 3;
79-
configuration.browserDisconnectTolerance = 2;
80-
configuration.browserNoActivityTimeout = 20000;
81-
configuration.browserDisconnectTimeout = 5000;
51+
configuration.browsers = ['ChromeHeadless'];
8252
}
8353

8454
config.set(configuration);

package.json

+27-26
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,22 @@
4646
"@angular/core": "^2.3.0"
4747
},
4848
"devDependencies": {
49-
"@angular/common": "2.4.3",
50-
"@angular/compiler": "2.4.3",
51-
"@angular/compiler-cli": "2.4.3",
52-
"@angular/core": "2.4.3",
53-
"@angular/forms": "2.4.3",
54-
"@angular/http": "2.4.3",
55-
"@angular/language-service": "2.4.3",
56-
"@angular/platform-browser": "2.4.3",
57-
"@angular/platform-browser-dynamic": "2.4.3",
58-
"@angular/router": "3.4.3",
49+
"@angular/cli": "1.5.0",
50+
"@angular/common": "4.3.6",
51+
"@angular/compiler": "4.3.6",
52+
"@angular/compiler-cli": "4.3.6",
53+
"@angular/core": "4.3.6",
54+
"@angular/forms": "4.3.6",
55+
"@angular/http": "4.3.6",
56+
"@angular/language-service": "4.3.6",
57+
"@angular/platform-browser": "4.3.6",
58+
"@angular/platform-browser-dynamic": "4.3.6",
59+
"@angular/router": "4.3.6",
5960
"@angular/tsc-wrapped": "0.5.1",
60-
"@ngtools/webpack": "1.2.3",
61-
"@types/jasmine": "2.5.40",
62-
"@types/marked": "0.0.28",
63-
"@types/node": "7.0.0",
64-
"@types/webpack": "^2.2.1",
65-
"angular-cli": "1.0.0-beta.25.5",
61+
"@types/jasmine": "2.5.54",
62+
"@types/marked": "0.3.0",
63+
"@types/node": "8.0.28",
64+
"@types/webpack": "3.0.10",
6665
"bootstrap": "3.3.7",
6766
"chokidar-cli": "1.2.0",
6867
"classlist-polyfill": "1.0.3",
@@ -78,36 +77,38 @@
7877
"gitignore-to-glob": "0.3.0",
7978
"google-code-prettify": "1.0.5",
8079
"html-loader": "0.4.4",
81-
"jasmine": "2.5.3",
82-
"jasmine-core": "2.5.2",
80+
"jasmine": "2.8.0",
81+
"jasmine-core": "2.8.0",
8382
"jasmine-data-provider": "2.2.0",
84-
"jasmine-spec-reporter": "3.2.0",
85-
"karma": "1.4.0",
83+
"jasmine-spec-reporter": "4.2.1",
84+
"karma": "1.7.1",
8685
"karma-chrome-launcher": "^2.0.0",
8786
"karma-cli": "^1.0.1",
87+
"karma-coverage-istanbul-reporter": "^1.2.1",
8888
"karma-jasmine": "^1.0.2",
89-
"karma-remap-istanbul": "0.4.0",
90-
"karma-sauce-launcher": "1.1.0",
89+
"karma-jasmine-html-reporter": "^0.2.2",
90+
"karma-remap-istanbul": "0.6.0",
91+
"karma-sauce-launcher": "1.2.0",
9192
"lite-server": "2.2.2",
9293
"lodash": "4.17.4",
9394
"markdown-loader": "^0.1.7",
9495
"marked": "0.3.6",
95-
"ng2-bootstrap": "1.2.2",
96+
"ngx-bootstrap": "2.0.0-beta.8",
9697
"ng2-page-scroll": "4.0.0-beta.2",
97-
"ngm-cli": "0.4.3",
98+
"ngm-cli": "0.8.3",
9899
"npm-run-all": "^4.0.1",
99100
"pre-commit": "1.2.2",
100101
"protractor": "5.0.0",
101102
"reflect-metadata": "0.1.9",
102103
"require-dir": "0.3.1",
103-
"rxjs": "5.0.3",
104+
"rxjs": "5.4.3",
104105
"systemjs-builder": "0.15.34",
105106
"ts-helpers": "^1.1.1",
106107
"ts-node": "2.0.0",
107108
"tslint": "4.3.1",
108109
"tslint-config-valorsoft": "1.2.0",
109110
"typedoc": "0.5.5",
110-
"typescript": "2.1.5",
111+
"typescript": "2.4.2",
111112
"wallaby-webpack": "0.0.30",
112113
"webdriver-manager": "11.1.1",
113114
"zone.js": "0.7.5"

scripts/typings.d.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ declare const ENV:string;
88
// google code-prettify
99
declare const PR:any;
1010

11-
declare const global:any;
1211

1312
declare module jasmine {
14-
interface Matchers {
13+
interface Matchers<T> {
1514
toHaveCssClass(expected: any): boolean;
1615
}
1716
}

0 commit comments

Comments
 (0)