Skip to content

Commit

Permalink
fix(demo): update dependencies, fix aot build (#902)
Browse files Browse the repository at this point in the history
* chore(deps): update dependencies

* fix(demo): fix aot build
  • Loading branch information
IlyaSurmay authored and valorkin committed Nov 21, 2017
1 parent 3afaf63 commit 6328439
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 104 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ npm-debug.log
# ignore build and dist for now
/dist
/temp
.tmp
/demo/dist
/demo/temp
/logs
Expand Down
2 changes: 1 addition & 1 deletion angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
],
"scripts": [
],
"environmentSource": "environments/environment.ts",
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
Expand Down
2 changes: 1 addition & 1 deletion demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { CommonModule } from '@angular/common';
import { TabsModule, ButtonsModule } from 'ng2-bootstrap';
import { TabsModule, ButtonsModule } from 'ngx-bootstrap';

import { SelectModule } from 'ng2-select';
import { AppComponent } from './app.component';
Expand Down
2 changes: 1 addition & 1 deletion demo/src/app/components/select/children-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h3>Select a city by country</h3>
<button type="button" class="btn btn-primary"
[(ngModel)]="disabledV" btnCheckbox
btnCheckboxTrue="1" btnCheckboxFalse="0">
{{disabled === '1' ? 'Enable' : 'Disable'}}
{{disabled ? 'Enable' : 'Disable'}}
</button>
</div>
</div>
10 changes: 5 additions & 5 deletions demo/src/app/components/select/children-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ export class ChildrenDemoComponent {
]
}
];
private value:any = {};
private _disabledV:string = '0';
private disabled:boolean = false;
public value:any = {};
public _disabledV:string = '0';
public disabled:boolean = false;

private get disabledV():string {
public get disabledV():string {
return this._disabledV;
}

private set disabledV(value:string) {
public set disabledV(value:string) {
this._disabledV = value;
this.disabled = this._disabledV === '1';
}
Expand Down
2 changes: 1 addition & 1 deletion demo/src/app/components/select/multiple-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h3>Select multiple cities</h3>
<button type="button" class="btn btn-primary"
[(ngModel)]="disabledV" btnCheckbox
btnCheckboxTrue="1" btnCheckboxFalse="0">
{{disabled === '1' ? 'Enable' : 'Disable'}}
{{disabled ? 'Enable' : 'Disable'}}
</button>
</div>
</div>
10 changes: 5 additions & 5 deletions demo/src/app/components/select/multiple-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ export class MultipleDemoComponent {
'Sofia', 'Stockholm', 'Stuttgart', 'The Hague', 'Turin', 'Valencia', 'Vienna',
'Vilnius', 'Warsaw', 'Wrocław', 'Zagreb', 'Zaragoza'];

private value:any = ['Athens'];
private _disabledV:string = '0';
private disabled:boolean = false;
public value:any = ['Athens'];
public _disabledV:string = '0';
public disabled:boolean = false;

private get disabledV():string {
public get disabledV():string {
return this._disabledV;
}

private set disabledV(value:string) {
public set disabledV(value:string) {
this._disabledV = value;
this.disabled = this._disabledV === '1';
}
Expand Down
2 changes: 1 addition & 1 deletion demo/src/app/components/select/rich-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h3>Select a color</h3>
<button type="button" class="btn btn-primary"
[(ngModel)]="disabledV" btnCheckbox
btnCheckboxTrue="1" btnCheckboxFalse="0">
{{disabled === '1' ? 'Enable' : 'Disable'}}
{{disabled ? 'Enable' : 'Disable'}}
</button>
</div>
</div>
12 changes: 6 additions & 6 deletions demo/src/app/components/select/rich-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ const COLORS = [
encapsulation: ViewEncapsulation.None // Enable dynamic HTML styles
})
export class RichDemoComponent implements OnInit {
private value:any = {};
private _disabledV:string = '0';
private disabled:boolean = false;
private items:Array<any> = [];
public value:any = {};
public _disabledV:string = '0';
public disabled:boolean = false;
public items:Array<any> = [];

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

private get disabledV():string {
public get disabledV():string {
return this._disabledV;
}

private set disabledV(value:string) {
public set disabledV(value:string) {
this._disabledV = value;
this.disabled = this._disabledV === '1';
}
Expand Down
2 changes: 1 addition & 1 deletion demo/src/app/components/select/single-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h3>Select a single city</h3>
<button type="button" class="btn btn-primary"
[(ngModel)]="disabledV" btnCheckbox
btnCheckboxTrue="1" btnCheckboxFalse="0">
{{disabled === '1' ? 'Enable' : 'Disable'}}
{{disabled ? 'Enable' : 'Disable'}}
</button>
</div>
</div>
10 changes: 5 additions & 5 deletions demo/src/app/components/select/single-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ export class SingleDemoComponent {
'The Hague', 'Turin', 'Valencia', 'Vienna', 'Vilnius', 'Warsaw', 'Wrocław',
'Zagreb', 'Zaragoza', 'Łódź'];

private value:any = {};
private _disabledV:string = '0';
private disabled:boolean = false;
public value:any = {};
public _disabledV:string = '0';
public disabled:boolean = false;

private get disabledV():string {
public get disabledV():string {
return this._disabledV;
}

private set disabledV(value:string) {
public set disabledV(value:string) {
this._disabledV = value;
this.disabled = this._disabledV === '1';
}
Expand Down
6 changes: 3 additions & 3 deletions demo/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ declare const ENV:string;
// google code-prettify
declare const PR:any;

declare const require:any;
declare const global:any;
// declare const require:any;
// declare const global:any;

declare module jasmine {
interface Matchers {
interface Matchers<T> {
toHaveCssClass(expected: any): boolean;
}
}
62 changes: 16 additions & 46 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,31 @@ const customLaunchers = require('./scripts/sauce-browsers').customLaunchers;
module.exports = function (config) {
const configuration = {
basePath: '',
frameworks: ['jasmine', 'angular-cli'],
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-remap-istanbul'),
require('angular-cli/plugins/karma')
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma'),
require('karma-sauce-launcher')
],
files: [
{pattern: './scripts/test.ts', watched: false}
],
preprocessors: {
'./scripts/test.ts': ['angular-cli']
'./scripts/test.ts': ['@angular/cli']
},
remapIstanbulReporter: {
reports: {
html: 'coverage',
lcovonly: './coverage/coverage.lcov'
}
coverageIstanbulReporter: {
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
angularCli: {
config: './angular-cli.json',
environment: 'dev'
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['dots', 'karma-remap-istanbul']
: ['dots'],
? ['dots', 'coverage-istanbul']
: ['dots', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand All @@ -40,45 +39,16 @@ module.exports = function (config) {
singleRun: false,
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
base: 'ChromeHeadless',
flags: ['--disable-translate', '--disable-extensions']
}
},
mime: { 'text/x-typescript': ['ts','tsx'] },
client: { captureConsole: true }
mime: {'text/x-typescript': ['ts', 'tsx']},
client: {captureConsole: true, clearContext: false}
};

if (process.env.TRAVIS) {
configuration.browsers = ['Chrome_travis_ci'];
}

if (process.env.SAUCE) {
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.');
process.exit(1);
}

configuration.plugins.push(require('karma-sauce-launcher'));
configuration.reporters.push('saucelabs');
configuration.sauceLabs = {
verbose: true,
testName: 'ng2-bootstrap unit tests',
recordScreenshots: false,
username: process.env.SAUCE_USERNAME,
accessKey: process.env.SAUCE_ACCESS_KEY,
connectOptions: {
port: 5757,
logfile: 'sauce_connect.log'
},
public: 'public'
};
configuration.captureTimeout = 0;
configuration.customLaunchers = customLaunchers();
configuration.browsers = Object.keys(configuration.customLaunchers);
configuration.concurrency = 3;
configuration.browserDisconnectTolerance = 2;
configuration.browserNoActivityTimeout = 20000;
configuration.browserDisconnectTimeout = 5000;
configuration.browsers = ['ChromeHeadless'];
}

config.set(configuration);
Expand Down
53 changes: 27 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,22 @@
"@angular/core": "^2.3.0"
},
"devDependencies": {
"@angular/common": "2.4.3",
"@angular/compiler": "2.4.3",
"@angular/compiler-cli": "2.4.3",
"@angular/core": "2.4.3",
"@angular/forms": "2.4.3",
"@angular/http": "2.4.3",
"@angular/language-service": "2.4.3",
"@angular/platform-browser": "2.4.3",
"@angular/platform-browser-dynamic": "2.4.3",
"@angular/router": "3.4.3",
"@angular/cli": "1.5.0",
"@angular/common": "4.3.6",
"@angular/compiler": "4.3.6",
"@angular/compiler-cli": "4.3.6",
"@angular/core": "4.3.6",
"@angular/forms": "4.3.6",
"@angular/http": "4.3.6",
"@angular/language-service": "4.3.6",
"@angular/platform-browser": "4.3.6",
"@angular/platform-browser-dynamic": "4.3.6",
"@angular/router": "4.3.6",
"@angular/tsc-wrapped": "0.5.1",
"@ngtools/webpack": "1.2.3",
"@types/jasmine": "2.5.40",
"@types/marked": "0.0.28",
"@types/node": "7.0.0",
"@types/webpack": "^2.2.1",
"angular-cli": "1.0.0-beta.25.5",
"@types/jasmine": "2.5.54",
"@types/marked": "0.3.0",
"@types/node": "8.0.28",
"@types/webpack": "3.0.10",
"bootstrap": "3.3.7",
"chokidar-cli": "1.2.0",
"classlist-polyfill": "1.0.3",
Expand All @@ -78,36 +77,38 @@
"gitignore-to-glob": "0.3.0",
"google-code-prettify": "1.0.5",
"html-loader": "0.4.4",
"jasmine": "2.5.3",
"jasmine-core": "2.5.2",
"jasmine": "2.8.0",
"jasmine-core": "2.8.0",
"jasmine-data-provider": "2.2.0",
"jasmine-spec-reporter": "3.2.0",
"karma": "1.4.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "1.7.1",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "0.4.0",
"karma-sauce-launcher": "1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-remap-istanbul": "0.6.0",
"karma-sauce-launcher": "1.2.0",
"lite-server": "2.2.2",
"lodash": "4.17.4",
"markdown-loader": "^0.1.7",
"marked": "0.3.6",
"ng2-bootstrap": "1.2.2",
"ngx-bootstrap": "2.0.0-beta.8",
"ng2-page-scroll": "4.0.0-beta.2",
"ngm-cli": "0.4.3",
"ngm-cli": "0.8.3",
"npm-run-all": "^4.0.1",
"pre-commit": "1.2.2",
"protractor": "5.0.0",
"reflect-metadata": "0.1.9",
"require-dir": "0.3.1",
"rxjs": "5.0.3",
"rxjs": "5.4.3",
"systemjs-builder": "0.15.34",
"ts-helpers": "^1.1.1",
"ts-node": "2.0.0",
"tslint": "4.3.1",
"tslint-config-valorsoft": "1.2.0",
"typedoc": "0.5.5",
"typescript": "2.1.5",
"typescript": "2.4.2",
"wallaby-webpack": "0.0.30",
"webdriver-manager": "11.1.1",
"zone.js": "0.7.5"
Expand Down
3 changes: 1 addition & 2 deletions scripts/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ declare const ENV:string;
// google code-prettify
declare const PR:any;

declare const global:any;

declare module jasmine {
interface Matchers {
interface Matchers<T> {
toHaveCssClass(expected: any): boolean;
}
}

0 comments on commit 6328439

Please sign in to comment.