Skip to content

Commit

Permalink
build(umd): export umd bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed Feb 16, 2017
1 parent fad4054 commit 9bbda32
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 34 deletions.
1 change: 0 additions & 1 deletion index.metadata.json

This file was deleted.

24 changes: 0 additions & 24 deletions index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion ng2-datepicker.metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./index"}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./index"}]}]
[{"__symbolic":"module","version":3,"metadata":{"DatePickerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./src/ng2-datepicker/ng2-datepicker.component","name":"DatePickerComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule"},{"__symbolic":"reference","module":"ng2-slimscroll","name":"SlimScrollModule"}],"exports":[{"__symbolic":"reference","module":"./src/ng2-datepicker/ng2-datepicker.component","name":"DatePickerComponent"},{"__symbolic":"reference","module":"ng2-slimscroll","name":"SlimScrollModule"},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule"}]}]}]}},"exports":[{"from":"./src/ng2-datepicker/ng2-datepicker.component","export":["DatePickerOptions","DateModel"]}]},{"__symbolic":"module","version":1,"metadata":{"DatePickerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./src/ng2-datepicker/ng2-datepicker.component","name":"DatePickerComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule"},{"__symbolic":"reference","module":"ng2-slimscroll","name":"SlimScrollModule"}],"exports":[{"__symbolic":"reference","module":"./src/ng2-datepicker/ng2-datepicker.component","name":"DatePickerComponent"},{"__symbolic":"reference","module":"ng2-slimscroll","name":"SlimScrollModule"},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule"}]}]}]}},"exports":[{"from":"./src/ng2-datepicker/ng2-datepicker.component","export":["DatePickerOptions","DateModel"]}]}]
25 changes: 24 additions & 1 deletion ng2-datepicker.ts
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
export * from './index';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { SlimScrollModule } from 'ng2-slimscroll';
import { DatePickerComponent } from './src/ng2-datepicker/ng2-datepicker.component';

export { DatePickerOptions, DateModel } from './src/ng2-datepicker/ng2-datepicker.component';

@NgModule({
declarations: [
DatePickerComponent
],
imports: [
CommonModule,
FormsModule,
SlimScrollModule
],
exports: [
DatePickerComponent,
SlimScrollModule,
FormsModule
]
})
export class DatePickerModule { }
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"name": "ng2-datepicker",
"version": "1.6.1",
"version": "1.7.0",
"description": "ng2-datepicker",
"main": "bundle/ng2-datepicker.umd.js",
"module": "ng2-datepicker.js",
"typings": "ng2-datepicker.d.ts",
"scripts": {
"serve": "node ./scripts/index.js --serve",
"start": "npm run serve",
Expand All @@ -13,7 +16,7 @@
"lint": "npm run tslint \"src/**/*.ts\"",
"tslint": "tslint",
"sass": "node-sass src/ng2-datepicker/ng2-datepicker.sass src/ng2-datepicker/ng2-datepicker.css",
"build": "npm run css && ./node_modules/.bin/ngc -p tsconfig.build.json",
"build": "npm run css && ./node_modules/.bin/ngc -p tsconfig.build.json && rollup -c",
"prepublish": "npm run build",
"css": "node-sass src/styles/ng2-datepicker.sass --output src/ng2-datepicker/ --output-style expanded"
},
Expand Down Expand Up @@ -71,6 +74,8 @@
"glob": "^7.1.1",
"jasmine": "^2.5.3",
"jasmine-spec-reporter": "^3.2.0",
"jsdom": "^9.11.0",
"jsdom-global": "^2.1.1",
"karma": "^1.4.1",
"karma-chrome-launcher": "^2.0.0",
"karma-jasmine": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/clean.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

find . -name "*.js" -type f -not -path "./node_modules/*" -not -path "./scripts/*" -delete
find . -name "*.js" -type f -not -path "./node_modules/*" -not -path "./scripts/*" -not -path "./rollup.config.js" -delete
find . -name "*.js.map" -type f -not -path "./node_modules/*" -delete
find . -name "*.d.ts" -type f -not -path "./node_modules/*" -delete
find . -name "*.metadata.json" -type f -not -path "./node_modules/*" -delete
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { BrowserModule } from '@angular/platform-browser';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { DatePickerModule } from '../../';
import { DatePickerModule } from '../../ng2-datepicker';

@NgModule({
declarations: [
Expand Down
4 changes: 2 additions & 2 deletions src/ng2-datepicker/ng2-datepicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ export const CALENDAR_VALUE_ACCESSOR: any = {

@Component({
selector: 'ng2-datepicker',
templateUrl: 'ng2-datepicker.component.html',
styleUrls: ['ng2-datepicker.css'],
templateUrl: './ng2-datepicker.component.html',
styleUrls: ['./ng2-datepicker.css'],
providers: [CALENDAR_VALUE_ACCESSOR]
})
export class DatePickerComponent implements ControlValueAccessor, OnInit {
Expand Down
1 change: 0 additions & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"dist"
],
"files": [
"index.ts",
"ng2-datepicker.ts"
],
"angularCompilerOptions": {
Expand Down

0 comments on commit 9bbda32

Please sign in to comment.