Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

Commit

Permalink
updated with new build process
Browse files Browse the repository at this point in the history
  • Loading branch information
allenhwkim committed Dec 5, 2016
1 parent 6354b34 commit dc6ccb7
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 1,087 deletions.
3 changes: 3 additions & 0 deletions app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ const config = {
path: `${__dirname}/build/`,
publicPath: '/build/',
filename: 'app.js'
},
compilerOptions: {
declaration: false
}
};

Expand Down
32 changes: 20 additions & 12 deletions dist/datetime-picker.component.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,43 @@ import { DateTime } from './datetime';
export declare class DateTimePickerComponent implements AfterViewInit {
dateTime: DateTime;
cdRef: ChangeDetectorRef;
/**
* public variables
*/
dateOnly: boolean;
timeOnly: boolean;
selectedDate: Date;
hour: number;
minute: number;
el: HTMLElement;
monthData: any;
minuteStep: number;
firstDayOfWeek: string;
defaultValue: Date;
minDate: Date;
maxDate: Date;
minHour: Date;
maxHour: Date;
disabledDates: Date[];
changes: EventEmitter<any>;
closing: EventEmitter<any>;
private _hours;
private _minutes;
el: HTMLElement;
monthData: any;
disabledDatesInTime: number[];
constructor(elementRef: ElementRef, dateTime: DateTime, cdRef: ChangeDetectorRef);
ngAfterViewInit(): void;
readonly year: number;
readonly month: number;
readonly day: number;
readonly today: Date;
initDateTime(date: Date, defaultValue: Date): void;
toDate(year: number, month: number, day: number): Date;
year: number;
month: number;
day: number;
today: Date;
initDateTime(date: Date): void;
toDate(day: number, month?: number): Date;
toDateOnly(date: Date): Date;
/**
* set the selected date and close it when closeOnSelect is true
* @param date {Date}
*/
selectDate(dayNum?: number): void;
selectDate(date?: Date): boolean;
/**
* show prev/next month calendar
*/
updateMonthData(num: number): void;
isDateDisabled(date: Date): boolean;
}
8 changes: 8 additions & 0 deletions dist/datetime-picker.directive.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ export declare class DateTimePickerDirective implements OnInit, OnChanges {
private parent;
dateFormat: string;
dateOnly: boolean;
timeOnly: boolean;
closeOnSelect: string;
firstDayOfWeek: string;
defaultValue: Date;
minuteStep: number;
minDate: Date;
maxDate: Date;
minHour: Date;
maxHour: Date;
disabledDates: Date[];
formControlName: string;
ngModel: any;
ngModelChange: EventEmitter<{}>;
Expand Down
2 changes: 2 additions & 0 deletions dist/datetime.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export declare class DateTime {
firstDayOfWeek: number;
daysOfWeek: any[];
localizedDaysOfWeek: any[];
static customFirstDayOfWeek: number;
constructor();
initialize(): void;
getMonthData(year: number, month: number): any;
Expand All @@ -14,4 +15,5 @@ export declare class DateTime {
static removeTimezone(dateStr: any): string;
static addDSTOffset(dateStr: any): string;
static getDateFromString(dateStr: any): Date;
static setFirstDayOfWeek(firstDayOfWeek: number): void;
}
886 changes: 0 additions & 886 deletions dist/src/datetime-picker.component.ngfactory.ts

This file was deleted.

119 changes: 0 additions & 119 deletions dist/src/datetime-picker.directive.ngfactory.ts

This file was deleted.

62 changes: 0 additions & 62 deletions dist/src/index.ngfactory.ts

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"scripts": {
"start": "NODE_ENV=dev node node_modules/.bin/webpack-dashboard --tilte dev -- node_modules/.bin/webpack-dev-server --quiet --port 9002 --content-base app --config app/webpack.config --open",
"lint": "./node_modules/.bin/tslint 'src/**/*.ts' 'app/**/*.ts'",
"clean:dist": "rimraf dist/dist app/dist",
"build": "npm-run-all --serial clean:dist build:ngc build:umd build:app clean:dist",
"build:ngc": "./node_modules/.bin/ngc",
"clean": "rimraf dist",
"build": "npm-run-all --serial clean build:ngc build:umd build:app",
"build:ngc": "./node_modules/.bin/ngc -p tsconfig.ngc.json",
"build:umd": "NODE_ENV=prod webpack",
"build:app": "NODE_ENV=prod webpack --config app/webpack.config"
},
Expand Down
6 changes: 1 addition & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,10 @@
"exclude": [
"node_modules"
],
"angularCompilerOptions": {
"genDir": "dist",
"skipMetadataEmit" : true
},
"compileOnSave": false,
"buildOnSave": false,
"angularCompilerOptions": {
"strictMetadataEmit": true,
"skipTemplateCodegen": true
}
}
}
42 changes: 42 additions & 0 deletions tsconfig.ngc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["es5", "es6", "dom"],
"module": "commonjs",
"declaration": true,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
"pretty": true,
"allowUnreachableCode": true,
"allowUnusedLabels": true,
"noImplicitAny": false,
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"allowSyntheticDefaultImports": true,
"suppressExcessPropertyErrors": true,
"suppressImplicitAnyIndexErrors": true,
"skipDefaultLibCheck": true,
"noEmitHelpers": false,
"isolatedModules": false,
"strictNullChecks": false,
"outDir": "dist",
"baseUrl": "src",
"paths": {
"ng2-datetime-picker": ["./index"]
}
},
"files": [
"src/index.ts"
],
"exclude": [
"node_modules"
],
"compileOnSave": false,
"buildOnSave": false,
"angularCompilerOptions": {
"strictMetadataEmit": true,
"skipTemplateCodegen": true
}
}

0 comments on commit dc6ccb7

Please sign in to comment.