Skip to content

Commit

Permalink
feat(build): now using ngm build
Browse files Browse the repository at this point in the history
  • Loading branch information
valorkin committed Dec 1, 2016
1 parent b78085b commit 8126b06
Show file tree
Hide file tree
Showing 33 changed files with 107 additions and 98 deletions.
7 changes: 0 additions & 7 deletions angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
}
}
],
"module":[{
"name": "ng2-bootstrap",
"root": "src",
"outDir": "dist",
"main":"index.ts",
"tsconfig": "tsconfig.json"
}],
"addons": [],
"packages": [],
"e2e": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { Component } from '@angular/core';
})
export class AccordionDemoComponent {
public oneAtATime:boolean = true;
public items:Array<string> = ['Item 1', 'Item 2', 'Item 3'];
public items:string[] = ['Item 1', 'Item 2', 'Item 3'];

public status:Object = {
isFirstOpen: true,
isFirstDisabled: false
};

public groups:Array<any> = [
public groups:any[] = [
{
title: 'Dynamic Group Header - 1',
content: 'Dynamic Group Body - 1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Component } from '@angular/core';
templateUrl: './alerts-demo.component.html'
})
export class AlertsDemoComponent {
public alerts:Array<Object> = [
public alerts:Object[] = [
{
type: 'danger',
msg: 'Oh snap! Change a few things up and try submitting again.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Component } from '@angular/core';
export class CarouselDemoComponent {
public myInterval:number = 5000;
public noWrapSlides:boolean = false;
public slides:Array<any> = [];
public slides:any[] = [];

public constructor() {
for (let i = 0; i < 4; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import * as moment from 'moment';
export class DatepickerDemoComponent {
public dt:Date = new Date();
public minDate:Date = void 0;
public events:Array<any>;
public events:any[];
public tomorrow:Date;
public afterTomorrow:Date;
public dateDisabled: Array<{date: Date, mode: string}>;
public formats:Array<string> = ['DD-MM-YYYY', 'YYYY/MM/DD', 'DD.MM.YYYY', 'shortDate'];
public dateDisabled: {date: Date, mode: string}[];
public formats:string[] = ['DD-MM-YYYY', 'YYYY/MM/DD', 'DD.MM.YYYY', 'shortDate'];
public format:string = this.formats[0];
public dateOptions:any = {
formatYear: 'YY',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Component } from '@angular/core';
export class DropdownDemoComponent {
public disabled:boolean = false;
public status:{isopen:boolean} = {isopen: false};
public items:Array<string> = ['The first choice!',
public items:string[] = ['The first choice!',
'And another choice for you.', 'but wait! A third!'];

public toggled(open:boolean):void {
Expand Down
2 changes: 1 addition & 1 deletion demo/src/app/components/tabs/demos/tabs-demo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
templateUrl: './tabs-demo.component.html'
})
export class TabsDemoComponent {
public tabs:Array<any> = [
public tabs:any[] = [
{title: 'Dynamic Title 1', content: 'Dynamic content 1'},
{title: 'Dynamic Title 2', content: 'Dynamic content 2', disabled: true},
{title: 'Dynamic Title 3', content: 'Dynamic content 3', removable: true},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class TypeaheadDemoComponent {
public asyncSelected:string = '';
public typeaheadLoading:boolean = false;
public typeaheadNoResults:boolean = false;
public states:Array<string> = ['Alabama', 'Alaska', 'Arizona', 'Arkansas',
public states:string[] = ['Alabama', 'Alaska', 'Arizona', 'Arkansas',
'California', 'Colorado',
'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho',
'Illinois', 'Indiana', 'Iowa',
Expand All @@ -36,7 +36,7 @@ export class TypeaheadDemoComponent {
'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont',
'Virginia', 'Washington',
'West Virginia', 'Wisconsin', 'Wyoming'];
public statesComplex:Array<any> = [
public statesComplex:any[] = [
{id: 1, name: 'Alabama', region: 'South'}, {id: 2, name: 'Alaska', region: 'West'}, {id: 3, name: 'Arizona', region: 'West'},
{id: 4, name: 'Arkansas', region: 'South'}, {id: 5, name: 'California', region: 'West'},
{id: 6, name: 'Colorado', region: 'West'}, {id: 7, name: 'Connecticut', region: 'Northeast'},
Expand Down
30 changes: 14 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,21 @@
"description": "angular2 bootstrap components",
"private": true,
"scripts": {
"flow.docs": "typedoc --exclude '**/*.spec.ts' ./src/",
"flow.deploy:gh-pages": "npm run build && ng build -p && gh-pages -d demo/dist",
"flow.lint": "tslint \"**/*.ts\" -c tslint.json -e \"node_modules/**\" -e \"dist/**\" -e \"temp/**\"",
"typedoc": "typedoc --exclude '**/*.spec.ts' ./src/",
"demo": "run-s build demo.build demo.deploy",
"demo.build": "ng build -p",
"demo.deploy": "gh-pages -d demo/dist",
"link": "ngm link -p src && npm link ng2-bootstrap",
"lint": "tslint \"**/*.ts\" -c tslint.json --fix --type-check -t prose -e \"node_modules/**\" -e \"dist/**\" -e \"temp/**\"",
"flow.changelog": "conventional-changelog -i CHANGELOG.md -s -p angular -v",
"flow.github-release": "conventional-github-releaser -p angular",
"preflow.publish": "run-s flow.clean flow.compile",
"flow.publish": "echo 'here will be publish script' && exit 1",
"postflow.publish": "npm run flow.deploy:gh-pages",
"build": "npm build -p src",
"disable-prestart": "chokidar 'src/**/*.ts' -c \"npm run build\" --initial",
"flow.publish": "ngm publish -p src --tag next",
"postflow.publish": "npm run demo",
"build": "ngm build -p src",
"start": "ng serve",
"build:copy": "cpy '**/*.*' ../node_modules/ng2-bootstrap --cwd=dist --parents",
"pretest": "run-s flow.lint build:copy",
"pretest": "run-s build link",
"test": "ng test --watch false",
"test:watch": "ng test",
"preversion": "npm test",
"version": "npm run flow.changelog && git add -A",
"postversion": "git push origin development && git push --tags",
"pree2e": "webdriver-manager update",
"e2e": "protractor",
"e2e.saucelabs": "tsc -p ./demo/e2e/ && webdriver-manager update && protractor protractor.saucelabs.conf.js"
Expand Down Expand Up @@ -66,7 +63,6 @@
"bootstrap": "3.3.7",
"chokidar-cli": "1.2.0",
"codecov": "1.0.1",
"codelyzer": "1.0.0-beta.4",
"conventional-changelog-cli": "1.2.0",
"conventional-github-releaser": "1.1.3",
"core-js": "2.4.1",
Expand Down Expand Up @@ -97,8 +93,10 @@
"require-dir": "0.3.1",
"rxjs": "5.0.0-beta.12",
"systemjs-builder": "0.15.34",
"ts-helpers": "1.1.1",
"tslint-config-valorsoft": "1.1.4",
"ts-helpers": "1.1.2",
"codelyzer": "^2.0.0-beta.1",
"tslint": "^4.0.0",
"tslint-config-valorsoft": "1.2.0",
"typedoc": "0.5.1",
"typescript": "2.0.10",
"wallaby-webpack": "0.0.26",
Expand Down
2 changes: 1 addition & 1 deletion src/accordion/accordion.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class AccordionComponent {
public addClass:boolean = true;
/* tslint:enable:no-unused-variable */

protected groups:Array<AccordionPanelComponent> = [];
protected groups:AccordionPanelComponent[] = [];

public closeOtherPanels(openGroup:AccordionPanelComponent):void {
if (!this.closeOthers) {
Expand Down
2 changes: 1 addition & 1 deletion src/alert/alert.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class AlertComponent implements OnInit {
@Output() public close:EventEmitter<AlertComponent> = new EventEmitter<AlertComponent>(false);

public closed:boolean;
protected classes:Array<string> = [];
protected classes:string[] = [];

public ngOnInit():any {
this.classes[0] = `alert-${this.type}`;
Expand Down
2 changes: 1 addition & 1 deletion src/carousel/carousel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class CarouselComponent implements OnDestroy {
this.restartTimer();
}

public slides:Array<SlideComponent> = [];
public slides:SlideComponent[] = [];
protected currentInterval:any;
protected isPlaying:boolean;
protected destroyed:boolean = false;
Expand Down
10 changes: 5 additions & 5 deletions src/datepicker/datepicker-inner.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export class DatePickerInnerComponent implements OnInit, OnChanges {
@Input() public formatMonthTitle: string;
@Input() public onlyCurrentMonth: boolean;
@Input() public shortcutPropagation: boolean;
@Input() public customClass: Array<{date: Date, mode: string, clazz: string}>;
@Input() public customClass: {date: Date, mode: string, clazz: string}[];
@Input() public monthColLimit: number;
@Input() public yearColLimit: number;
@Input() public dateDisabled: Array<{date:Date, mode:string}>;
@Input() public dateDisabled: {date:Date, mode:string}[];
@Input() public initDate: Date;

@Output() public selectionDone: EventEmitter<Date> = new EventEmitter<Date>(undefined);
Expand All @@ -79,7 +79,7 @@ export class DatePickerInnerComponent implements OnInit, OnChanges {
public stepMonth: any = {};
public stepYear: any = {};

protected modes: Array<string> = ['day', 'month', 'year'];
protected modes: string[] = ['day', 'month', 'year'];
protected dateFormatter: DateFormatter = new DateFormatter();
protected uniqueId: string;
protected _activeDate: Date;
Expand Down Expand Up @@ -229,8 +229,8 @@ export class DatePickerInnerComponent implements OnInit, OnChanges {
return dateObject;
}

public split(arr: Array<any>, size: number): Array<any> {
let arrays: Array<any> = [];
public split(arr: any[], size: number): any[] {
let arrays: any[] = [];
while (arr.length > 0) {
arrays.push(arr.splice(0, size));
}
Expand Down
4 changes: 2 additions & 2 deletions src/datepicker/datepicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ export class DatePickerComponent implements ControlValueAccessor {
@Input() public yearRange:number;
@Input() public onlyCurrentMonth:boolean;
@Input() public shortcutPropagation:boolean;
@Input() public customClass:Array<{date:Date, mode:string, clazz:string}>;
@Input() public customClass:{date:Date, mode:string, clazz:string}[];
@Input() public monthColLimit: number;
@Input() public yearColLimit: number;
@Input() public dateDisabled:Array<{date:Date, mode:string}>;
@Input() public dateDisabled:{date:Date, mode:string}[];

@Output() public selectionDone:EventEmitter<Date> = new EventEmitter<Date>(undefined);

Expand Down
14 changes: 7 additions & 7 deletions src/datepicker/daypicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ const TEMPLATE_OPTIONS:any = {
})
export class DayPickerComponent implements OnInit {

public labels:Array<any> = [];
public labels:any[] = [];
public title:string;
public rows:Array<any> = [];
public weekNumbers:Array<number> = [];
public rows:any[] = [];
public weekNumbers:number[] = [];
public datePicker:DatePickerInnerComponent;
public CURRENT_THEME_TEMPLATE:any = TEMPLATE_OPTIONS[Ng2BootstrapConfig.theme || Ng2BootstrapTheme.BS3];

Expand Down Expand Up @@ -120,8 +120,8 @@ export class DayPickerComponent implements OnInit {
}

// 42 is the number of days on a six-week calendar
let _days:Array<Date> = self.getDates(firstDate, 42);
let days:Array<any> = [];
let _days:Date[] = self.getDates(firstDate, 42);
let days:any[] = [];
for (let i = 0; i < 42; i++) {
let _dateObject = this.createDateObject(_days[i], this.formatDay);
_dateObject.secondary = _days[i].getMonth() !== month;
Expand Down Expand Up @@ -158,8 +158,8 @@ export class DayPickerComponent implements OnInit {
this.datePicker.refreshView();
}

protected getDates(startDate:Date, n:number):Array<Date> {
let dates:Array<Date> = new Array(n);
protected getDates(startDate:Date, n:number):Date[] {
let dates:Date[] = new Array(n);
let current = new Date(startDate.getTime());
let i = 0;
let date:Date;
Expand Down
4 changes: 2 additions & 2 deletions src/datepicker/monthpicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import { DatePickerInnerComponent } from './datepicker-inner.component';
})
export class MonthPickerComponent implements OnInit {
public title:string;
public rows:Array<any> = [];
public rows:any[] = [];
public datePicker:DatePickerInnerComponent;
public maxMode:string;

Expand All @@ -66,7 +66,7 @@ export class MonthPickerComponent implements OnInit {
this.datePicker.stepMonth = {years: 1};

this.datePicker.setRefreshViewHandler(function ():void {
let months:Array<any> = new Array(12);
let months:any[] = new Array(12);
let year:number = this.activeDate.getFullYear();
let date:Date;

Expand Down
4 changes: 2 additions & 2 deletions src/datepicker/yearpicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { DatePickerInnerComponent } from './datepicker-inner.component';
export class YearPickerComponent implements OnInit {
public datePicker:DatePickerInnerComponent;
public title:string;
public rows:Array<any> = [];
public rows:any[] = [];

public constructor(datePicker:DatePickerInnerComponent) {
this.datePicker = datePicker;
Expand All @@ -66,7 +66,7 @@ export class YearPickerComponent implements OnInit {
this.datePicker.stepYear = {years: this.datePicker.yearRange};

this.datePicker.setRefreshViewHandler(function ():void {
let years:Array<any> = new Array(this.yearRange);
let years:any[] = new Array(this.yearRange);
let date:Date;
let start = self.getStartingYear(this.activeDate.getFullYear());

Expand Down
3 changes: 2 additions & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "ng-bootstrap",
"name": "ng2-bootstrap",
"version": "1.1.16-3",
"dependencies": {
"moment": "*"
},
Expand Down
4 changes: 2 additions & 2 deletions src/pagination/pager.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class PagerComponent implements ControlValueAccessor, OnInit, KeyAttribut
public elementRef:ElementRef;

public classMap:string;
public pages:Array<any>;
public pages:any[];

protected _itemsPerPage:number;
protected _totalItems:number;
Expand Down Expand Up @@ -189,7 +189,7 @@ export class PagerComponent implements ControlValueAccessor, OnInit, KeyAttribut
return { text, number:num, active };
}

protected getPages(currentPage:number, totalPages:number):Array<any> {
protected getPages(currentPage:number, totalPages:number):any[] {
let pages:any[] = [];

// Default page limits
Expand Down
4 changes: 2 additions & 2 deletions src/pagination/pagination.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class PaginationComponent implements ControlValueAccessor, OnInit, Pagina
public elementRef:ElementRef;

public classMap:string;
public pages:Array<any>;
public pages:any[];

protected _itemsPerPage:number;
protected _totalItems:number;
Expand Down Expand Up @@ -254,7 +254,7 @@ export class PaginationComponent implements ControlValueAccessor, OnInit, Pagina
return { text, number:num, active };
}

protected getPages(currentPage:number, totalPages:number):Array<any> {
protected getPages(currentPage:number, totalPages:number):any[] {
let pages:any[] = [];

// Default page limits
Expand Down
2 changes: 1 addition & 1 deletion src/progressbar/progress.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ProgressDirective implements OnInit {
});
}

public bars:Array<any> = [];
public bars:any[] = [];

protected _max:number;

Expand Down
6 changes: 3 additions & 3 deletions src/rating/rating.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class RatingComponent implements ControlValueAccessor, OnInit {
@Input() public stateOn:string;
@Input() public stateOff:string;
@Input() public readonly:boolean;
@Input() public titles:Array<string>;
@Input() public titles:string[];
@Input() public ratingStates:{stateOn:string, stateOff:string}[];

@Output() public onHover:EventEmitter<number> = new EventEmitter<number>(false);
Expand All @@ -35,7 +35,7 @@ export class RatingComponent implements ControlValueAccessor, OnInit {
public onTouched:any = Function.prototype;

public cd:NgModel;
public range:Array<any>;
public range:any[];
public value:number;
protected preValue:number;

Expand Down Expand Up @@ -110,7 +110,7 @@ export class RatingComponent implements ControlValueAccessor, OnInit {
}
}

protected buildTemplateObjects(ratingStates:Array<any>, max:number):Array<any> {
protected buildTemplateObjects(ratingStates:any[], max:number):any[] {
ratingStates = ratingStates || [];
let count = ratingStates.length || max;
let result:any[] = [];
Expand Down
2 changes: 1 addition & 1 deletion src/spec/accordion.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ describe('Component: Accordion', () => {

class TestAccordionComponent {
public oneAtATime:boolean = true;
public panels:Array<any> = [
public panels:any[] = [
{isOpen: false, isDisabled: false},
{isOpen: false, isDisabled: false},
{isOpen: false, isDisabled: false}
Expand Down
2 changes: 1 addition & 1 deletion src/spec/carousel.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('Component: Carousel', () => {
class TestCarouselComponent {
public myInterval:number = 5000;
public noWrapSlides:boolean = false;
public slides:Array<any> = [
public slides:any[] = [
{image: '//placekitten.com/600/300', text: 'slide0'},
{image: '//placekitten.com/600/300', text: 'slide1'},
{image: '//placekitten.com/600/300', text: 'slide2'}
Expand Down
Loading

0 comments on commit 8126b06

Please sign in to comment.