From 8b55acaba12e1cc2ecf4acfe53a1915b39b51093 Mon Sep 17 00:00:00 2001 From: Douglas Ludlow Date: Sat, 5 Mar 2016 08:26:19 -0700 Subject: [PATCH] Fix issue with import when using npm. --- .gitignore | 5 + .npmignore | 4 +- README.md | 2 +- demo/app.component.ts | 2 +- dist/components/modal-body.d.ts | 5 - dist/components/modal-body.js | 26 ----- dist/components/modal-body.js.map | 1 - dist/components/modal-footer.d.ts | 6 - dist/components/modal-footer.js | 32 ------ dist/components/modal-footer.js.map | 1 - dist/components/modal-header.d.ts | 6 - dist/components/modal-header.js | 31 ------ dist/components/modal-header.js.map | 1 - dist/components/modal.d.ts | 29 ----- dist/components/modal.js | 105 ------------------ dist/components/modal.js.map | 1 - dist/ng2-bs3-modal.d.ts | 6 - dist/ng2-bs3-modal.js | 18 --- dist/ng2-bs3-modal.js.map | 1 - package.json | 25 +++-- .../components/modal-body.ts | 0 .../components/modal-footer.ts | 0 .../components/modal-header.ts | 0 src/{ => ng2-bs3-modal}/components/modal.ts | 0 src/{ => ng2-bs3-modal}/ng2-bs3-modal.ts | 0 tsconfig.json | 14 ++- typings.json | 7 ++ 27 files changed, 42 insertions(+), 286 deletions(-) delete mode 100644 dist/components/modal-body.d.ts delete mode 100644 dist/components/modal-body.js delete mode 100644 dist/components/modal-body.js.map delete mode 100644 dist/components/modal-footer.d.ts delete mode 100644 dist/components/modal-footer.js delete mode 100644 dist/components/modal-footer.js.map delete mode 100644 dist/components/modal-header.d.ts delete mode 100644 dist/components/modal-header.js delete mode 100644 dist/components/modal-header.js.map delete mode 100644 dist/components/modal.d.ts delete mode 100644 dist/components/modal.js delete mode 100644 dist/components/modal.js.map delete mode 100644 dist/ng2-bs3-modal.d.ts delete mode 100644 dist/ng2-bs3-modal.js delete mode 100644 dist/ng2-bs3-modal.js.map rename src/{ => ng2-bs3-modal}/components/modal-body.ts (100%) rename src/{ => ng2-bs3-modal}/components/modal-footer.ts (100%) rename src/{ => ng2-bs3-modal}/components/modal-header.ts (100%) rename src/{ => ng2-bs3-modal}/components/modal.ts (100%) rename src/{ => ng2-bs3-modal}/ng2-bs3-modal.ts (100%) create mode 100644 typings.json diff --git a/.gitignore b/.gitignore index 5b61666..ff0f18d 100644 --- a/.gitignore +++ b/.gitignore @@ -234,3 +234,8 @@ _Pvt_Extensions # FAKE - F# Make .fake/ + +# Generated output +/bundles/ +/components/ +/ng2-bs3-modal.* diff --git a/.npmignore b/.npmignore index 315d4e1..c272044 100644 --- a/.npmignore +++ b/.npmignore @@ -9,6 +9,8 @@ Desktop.ini .DS_Store demo +test index.html tsconfig.json -tslint.json \ No newline at end of file +tslint.json +*.tgz \ No newline at end of file diff --git a/README.md b/README.md index 64b2a52..e5b456c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Or, if you're using systemjs, configure it to load them. And import them in your Then import and include in your component's directives: - import { MODAL_DIRECTIVES } from 'ng2-bs3-modal'; + import { MODAL_DIRECTIVES } from 'ng2-bs3-modal/ng2-bs3-modal'; @Component({ directives: [MODAL_DIRECTIVES] diff --git a/demo/app.component.ts b/demo/app.component.ts index cf70e32..a4b4387 100644 --- a/demo/app.component.ts +++ b/demo/app.component.ts @@ -1,5 +1,5 @@ import { Component } from 'angular2/core'; -import { MODAL_DIRECTIVES, ModalResult } from '../src/ng2-bs3-modal'; +import { MODAL_DIRECTIVES, ModalResult } from '../src/ng2-bs3-modal/ng2-bs3-modal'; @Component({ selector: 'modal-demo', diff --git a/dist/components/modal-body.d.ts b/dist/components/modal-body.d.ts deleted file mode 100644 index ebd0d68..0000000 --- a/dist/components/modal-body.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ModalComponent } from './modal'; -export declare class ModalBodyComponent { - private modal; - constructor(modal: ModalComponent); -} diff --git a/dist/components/modal-body.js b/dist/components/modal-body.js deleted file mode 100644 index 0c64844..0000000 --- a/dist/components/modal-body.js +++ /dev/null @@ -1,26 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -var core_1 = require('angular2/core'); -var modal_1 = require('./modal'); -var ModalBodyComponent = (function () { - function ModalBodyComponent(modal) { - this.modal = modal; - } - ModalBodyComponent = __decorate([ - core_1.Component({ - selector: 'modal-body', - template: "\n
\n \n
\n " - }), - __metadata('design:paramtypes', [modal_1.ModalComponent]) - ], ModalBodyComponent); - return ModalBodyComponent; -})(); -exports.ModalBodyComponent = ModalBodyComponent; -//# sourceMappingURL=modal-body.js.map \ No newline at end of file diff --git a/dist/components/modal-body.js.map b/dist/components/modal-body.js.map deleted file mode 100644 index de73800..0000000 --- a/dist/components/modal-body.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"modal-body.js","sourceRoot":"","sources":["../../src/components/modal-body.ts"],"names":["ModalBodyComponent","ModalBodyComponent.constructor"],"mappings":";;;;;;;;;AAAA,qBAA6D,eAAe,CAAC,CAAA;AAC7E,sBAA+B,SAAS,CAAC,CAAA;AAEzC;IASIA,4BAAoBA,KAAqBA;QAArBC,UAAKA,GAALA,KAAKA,CAAgBA;IAAIA,CAACA;IATlDD;QAACA,gBAASA,CAACA;YACPA,QAAQA,EAAEA,YAAYA;YACtBA,QAAQA,EAAEA,mGAITA;SACJA,CAACA;;2BAGDA;IAADA,yBAACA;AAADA,CAACA,AAVD,IAUC;AAFY,0BAAkB,qBAE9B,CAAA"} \ No newline at end of file diff --git a/dist/components/modal-footer.d.ts b/dist/components/modal-footer.d.ts deleted file mode 100644 index 12c8bc3..0000000 --- a/dist/components/modal-footer.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ModalComponent } from './modal'; -export declare class ModalFooterComponent { - private modal; - showDefaultButtons: boolean; - constructor(modal: ModalComponent); -} diff --git a/dist/components/modal-footer.js b/dist/components/modal-footer.js deleted file mode 100644 index a66cc55..0000000 --- a/dist/components/modal-footer.js +++ /dev/null @@ -1,32 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -var core_1 = require('angular2/core'); -var modal_1 = require('./modal'); -var ModalFooterComponent = (function () { - function ModalFooterComponent(modal) { - this.modal = modal; - this.showDefaultButtons = false; - } - __decorate([ - core_1.Input('show-default-buttons'), - __metadata('design:type', Boolean) - ], ModalFooterComponent.prototype, "showDefaultButtons", void 0); - ModalFooterComponent = __decorate([ - core_1.Component({ - selector: 'modal-footer', - styles: ["\n .btn[hidden] { display: none; }\n "], - template: "\n
\n \n \n \n
\n " - }), - __metadata('design:paramtypes', [modal_1.ModalComponent]) - ], ModalFooterComponent); - return ModalFooterComponent; -})(); -exports.ModalFooterComponent = ModalFooterComponent; -//# sourceMappingURL=modal-footer.js.map \ No newline at end of file diff --git a/dist/components/modal-footer.js.map b/dist/components/modal-footer.js.map deleted file mode 100644 index 2e61e6a..0000000 --- a/dist/components/modal-footer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"modal-footer.js","sourceRoot":"","sources":["../../src/components/modal-footer.ts"],"names":["ModalFooterComponent","ModalFooterComponent.constructor"],"mappings":";;;;;;;;;AAAA,qBAA6D,eAAe,CAAC,CAAA;AAC7E,sBAA+B,SAAS,CAAC,CAAA;AAEzC;IAeIA,8BAAoBA,KAAqBA;QAArBC,UAAKA,GAALA,KAAKA,CAAgBA;QADVA,uBAAkBA,GAAYA,KAAKA,CAACA;IACtBA,CAACA;IAD9CD;QAACA,YAAKA,CAACA,sBAAsBA,CAACA;;OAACA,oDAAkBA,UAAkBA;IAdvEA;QAACA,gBAASA,CAACA;YACPA,QAAQA,EAAEA,cAAcA;YACxBA,MAAMA,EAAEA,CAACA,iDAERA,CAACA;YACFA,QAAQA,EAAEA,+YAMTA;SACJA,CAACA;;6BAIDA;IAADA,2BAACA;AAADA,CAACA,AAhBD,IAgBC;AAHY,4BAAoB,uBAGhC,CAAA"} \ No newline at end of file diff --git a/dist/components/modal-header.d.ts b/dist/components/modal-header.d.ts deleted file mode 100644 index 24bb21a..0000000 --- a/dist/components/modal-header.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ModalComponent } from './modal'; -export declare class ModalHeaderComponent { - private modal; - showClose: boolean; - constructor(modal: ModalComponent); -} diff --git a/dist/components/modal-header.js b/dist/components/modal-header.js deleted file mode 100644 index 3d72969..0000000 --- a/dist/components/modal-header.js +++ /dev/null @@ -1,31 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -var core_1 = require('angular2/core'); -var modal_1 = require('./modal'); -var ModalHeaderComponent = (function () { - function ModalHeaderComponent(modal) { - this.modal = modal; - this.showClose = false; - } - __decorate([ - core_1.Input('show-close'), - __metadata('design:type', Boolean) - ], ModalHeaderComponent.prototype, "showClose", void 0); - ModalHeaderComponent = __decorate([ - core_1.Component({ - selector: 'modal-header', - template: "\n
\n \n \n
\n " - }), - __metadata('design:paramtypes', [modal_1.ModalComponent]) - ], ModalHeaderComponent); - return ModalHeaderComponent; -})(); -exports.ModalHeaderComponent = ModalHeaderComponent; -//# sourceMappingURL=modal-header.js.map \ No newline at end of file diff --git a/dist/components/modal-header.js.map b/dist/components/modal-header.js.map deleted file mode 100644 index f7db538..0000000 --- a/dist/components/modal-header.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"modal-header.js","sourceRoot":"","sources":["../../src/components/modal-header.ts"],"names":["ModalHeaderComponent","ModalHeaderComponent.constructor"],"mappings":";;;;;;;;;AAAA,qBAA6D,eAAe,CAAC,CAAA;AAC7E,sBAA+B,SAAS,CAAC,CAAA;AAEzC;IAWIA,8BAAoBA,KAAqBA;QAArBC,UAAKA,GAALA,KAAKA,CAAgBA;QADpBA,cAASA,GAAYA,KAAKA,CAACA;IACHA,CAACA;IAD9CD;QAACA,YAAKA,CAACA,YAAYA,CAACA;;OAACA,2CAASA,UAAkBA;IAVpDA;QAACA,gBAASA,CAACA;YACPA,QAAQA,EAAEA,cAAcA;YACxBA,QAAQA,EAAEA,6SAKTA;SACJA,CAACA;;6BAIDA;IAADA,2BAACA;AAADA,CAACA,AAZD,IAYC;AAHY,4BAAoB,uBAGhC,CAAA"} \ No newline at end of file diff --git a/dist/components/modal.d.ts b/dist/components/modal.d.ts deleted file mode 100644 index c7fcb30..0000000 --- a/dist/components/modal.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { AfterViewInit, EventEmitter } from 'angular2/core'; -export declare class ModalComponent implements AfterViewInit { - id: string; - $modal: any; - result: ModalResult; - hiding: boolean; - overrideSize: string; - animation: boolean; - size: string; - onClose: EventEmitter; - ngAfterViewInit(): void; - open(size?: string): void; - close(): void; - dismiss(): void; - private hide(); - private isSmall(); - private isLarge(); -} -export declare class ModalSize { - static Small: string; - static Large: string; - static validSize(size: string): boolean; -} -export declare enum ModalResult { - None = 0, - Close = 1, - Dismiss = 2, -} -export declare function uniqueId(prefix: string): string; diff --git a/dist/components/modal.js b/dist/components/modal.js deleted file mode 100644 index f051e22..0000000 --- a/dist/components/modal.js +++ /dev/null @@ -1,105 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -var core_1 = require('angular2/core'); -var ModalComponent = (function () { - function ModalComponent() { - this.id = uniqueId('modal_'); - this.result = ModalResult.None; - this.hiding = false; - this.overrideSize = null; - this.animation = true; - this.onClose = new core_1.EventEmitter(); - } - ModalComponent.prototype.ngAfterViewInit = function () { - var _this = this; - this.$modal = jQuery('#' + this.id); - this.$modal.appendTo('body').modal({ show: false }); - this.$modal - .on('hide.bs.modal', function (e) { - _this.hiding = true; - if (_this.result === ModalResult.None) - _this.dismiss(); - _this.result = ModalResult.None; - }) - .on('hidden.bs.modal', function (e) { - _this.hiding = false; - _this.overrideSize = null; - }); - }; - ModalComponent.prototype.open = function (size) { - if (ModalSize.validSize(size)) - this.overrideSize = size; - this.$modal.modal('show'); - }; - ModalComponent.prototype.close = function () { - this.result = ModalResult.Close; - this.onClose.next(this.result); - this.hide(); - }; - ModalComponent.prototype.dismiss = function () { - this.result = ModalResult.Dismiss; - this.onClose.next(this.result); - this.hide(); - }; - ModalComponent.prototype.hide = function () { - if (!this.hiding) - this.$modal.modal('hide'); - }; - ModalComponent.prototype.isSmall = function () { - return this.overrideSize !== ModalSize.Large && this.size === ModalSize.Small || this.overrideSize === ModalSize.Small; - }; - ModalComponent.prototype.isLarge = function () { - return this.overrideSize !== ModalSize.Small && this.size === ModalSize.Large || this.overrideSize === ModalSize.Large; - }; - __decorate([ - core_1.Input(), - __metadata('design:type', Boolean) - ], ModalComponent.prototype, "animation", void 0); - __decorate([ - core_1.Input(), - __metadata('design:type', String) - ], ModalComponent.prototype, "size", void 0); - __decorate([ - core_1.Output(), - __metadata('design:type', core_1.EventEmitter) - ], ModalComponent.prototype, "onClose", void 0); - ModalComponent = __decorate([ - core_1.Component({ - selector: 'modal', - template: "\n
\n
\n
\n \n
\n
\n
\n " - }), - __metadata('design:paramtypes', []) - ], ModalComponent); - return ModalComponent; -})(); -exports.ModalComponent = ModalComponent; -var ModalSize = (function () { - function ModalSize() { - } - ModalSize.validSize = function (size) { - return size && (size === ModalSize.Small || size === ModalSize.Large); - }; - ModalSize.Small = 'sm'; - ModalSize.Large = 'lg'; - return ModalSize; -})(); -exports.ModalSize = ModalSize; -(function (ModalResult) { - ModalResult[ModalResult["None"] = 0] = "None"; - ModalResult[ModalResult["Close"] = 1] = "Close"; - ModalResult[ModalResult["Dismiss"] = 2] = "Dismiss"; -})(exports.ModalResult || (exports.ModalResult = {})); -var ModalResult = exports.ModalResult; -var id = 0; -function uniqueId(prefix) { - return prefix + ++id; -} -exports.uniqueId = uniqueId; -//# sourceMappingURL=modal.js.map \ No newline at end of file diff --git a/dist/components/modal.js.map b/dist/components/modal.js.map deleted file mode 100644 index 0a7e7c9..0000000 --- a/dist/components/modal.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../src/components/modal.ts"],"names":["ModalComponent","ModalComponent.constructor","ModalComponent.ngAfterViewInit","ModalComponent.open","ModalComponent.close","ModalComponent.dismiss","ModalComponent.hide","ModalComponent.isSmall","ModalComponent.isLarge","ModalSize","ModalSize.constructor","ModalSize.validSize","ModalResult","uniqueId"],"mappings":"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"} \ No newline at end of file diff --git a/dist/ng2-bs3-modal.d.ts b/dist/ng2-bs3-modal.d.ts deleted file mode 100644 index 2e266ce..0000000 --- a/dist/ng2-bs3-modal.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Type } from 'angular2/core'; -export * from './components/modal'; -export * from './components/modal-header'; -export * from './components/modal-body'; -export * from './components/modal-footer'; -export declare const MODAL_DIRECTIVES: Type[]; diff --git a/dist/ng2-bs3-modal.js b/dist/ng2-bs3-modal.js deleted file mode 100644 index 3895534..0000000 --- a/dist/ng2-bs3-modal.js +++ /dev/null @@ -1,18 +0,0 @@ -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -var modal_1 = require('./components/modal'); -var modal_header_1 = require('./components/modal-header'); -var modal_body_1 = require('./components/modal-body'); -var modal_footer_1 = require('./components/modal-footer'); -__export(require('./components/modal')); -__export(require('./components/modal-header')); -__export(require('./components/modal-body')); -__export(require('./components/modal-footer')); -exports.MODAL_DIRECTIVES = [ - modal_1.ModalComponent, - modal_header_1.ModalHeaderComponent, - modal_body_1.ModalBodyComponent, - modal_footer_1.ModalFooterComponent -]; -//# sourceMappingURL=ng2-bs3-modal.js.map \ No newline at end of file diff --git a/dist/ng2-bs3-modal.js.map b/dist/ng2-bs3-modal.js.map deleted file mode 100644 index 6b09ad1..0000000 --- a/dist/ng2-bs3-modal.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ng2-bs3-modal.js","sourceRoot":"","sources":["../src/ng2-bs3-modal.ts"],"names":[],"mappings":";;;AAEA,sBAA+B,oBAAoB,CAAC,CAAA;AACpD,6BAAqC,2BAA2B,CAAC,CAAA;AACjE,2BAAmC,yBAAyB,CAAC,CAAA;AAC7D,6BAAqC,2BAA2B,CAAC,CAAA;AAEjE,iBAAc,oBAAoB,CAAC,EAAA;AACnC,iBAAc,2BAA2B,CAAC,EAAA;AAC1C,iBAAc,yBAAyB,CAAC,EAAA;AACxC,iBAAc,2BAA2B,CAAC,EAAA;AAE7B,wBAAgB,GAAW;IACpC,sBAAc;IACd,mCAAoB;IACpB,+BAAkB;IAClB,mCAAoB;CACvB,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index 03dad0b..3c4ba59 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,17 @@ { "name": "ng2-bs3-modal", - "version": "0.1.3", + "version": "0.1.4", "description": "Angular2 Boostrap3 Modal Component", - "main": "dist/ng2-bs3-modal.js", + "main": "ng2-bs3-modal.js", "scripts": { - "peer": "npm install es6-promise@^3.0.2 es6-shim@^0.33.3 reflect-metadata@0.1.2 rxjs@5.0.0-beta.0 zone.js@0.5.11", + "peer": "npm install es6-promise@^3.0.2 es6-shim@^0.33.3 reflect-metadata@0.1.2 rxjs@5.0.0-beta.0 zone.js@0.5.14", "lint": "node ./node_modules/.bin/tslint ./src/**/*.ts", - "clean": "node ./node_modules/.bin/rimraf ./dist", + "clean": "node ./node_modules/.bin/rimraf ./bundles ./components ./ng2-bs3-modal.js ./ng2-bs3-modal.d.ts", "tsc": "node ./node_modules/.bin/tsc --project .", - "build": "npm run clean && npm run lint && npm run tsc", + "tsc-single": "node ./node_modules/.bin/tsc --project . --rootDir ./src --outFile ./bundles/ng2-bs3-modal.js", + "uglify": "node ./node_modules/.bin/uglifyjs ./bundles/ng2-bs3-modal.js --output ./bundles/ng2-bs3-modal.min.js", + "bundles": "npm run tsc-single && npm run uglify", + "build": "npm run clean && npm run lint && npm run tsc && npm run bundles", "prepublish": "npm run build", "test": "echo \"Error: no test specified\" && exit 1" }, @@ -29,12 +32,18 @@ }, "homepage": "https://github.com/dougludlow/ng2-bs3-modal#readme", "devDependencies": { + "jasmine": "^2.4.1", + "karma": "^0.13.21", + "karma-jasmine": "^0.3.7", + "karma-phantomjs2-launcher": "^0.5.0", + "karma-spec-reporter": "0.0.24", "rimraf": "^2.5.1", - "tslint": "^3.3.0", - "typescript": "^1.7.5" + "tslint": "^3.4.0-dev.1", + "typescript": "^1.9.0-dev.20160217", + "uglify-js": "^2.6.2" }, "dependencies": { - "angular2": "^2.0.0-beta.3" + "angular2": "^2.0.0-beta.6" }, "peerDependencies": { "bootstrap": "3.3" diff --git a/src/components/modal-body.ts b/src/ng2-bs3-modal/components/modal-body.ts similarity index 100% rename from src/components/modal-body.ts rename to src/ng2-bs3-modal/components/modal-body.ts diff --git a/src/components/modal-footer.ts b/src/ng2-bs3-modal/components/modal-footer.ts similarity index 100% rename from src/components/modal-footer.ts rename to src/ng2-bs3-modal/components/modal-footer.ts diff --git a/src/components/modal-header.ts b/src/ng2-bs3-modal/components/modal-header.ts similarity index 100% rename from src/components/modal-header.ts rename to src/ng2-bs3-modal/components/modal-header.ts diff --git a/src/components/modal.ts b/src/ng2-bs3-modal/components/modal.ts similarity index 100% rename from src/components/modal.ts rename to src/ng2-bs3-modal/components/modal.ts diff --git a/src/ng2-bs3-modal.ts b/src/ng2-bs3-modal/ng2-bs3-modal.ts similarity index 100% rename from src/ng2-bs3-modal.ts rename to src/ng2-bs3-modal/ng2-bs3-modal.ts diff --git a/tsconfig.json b/tsconfig.json index 31ee437..b12f34b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,20 +1,22 @@ { "compilerOptions": { - "module": "commonjs", + "module": "system", + "moduleResolution": "node", "target": "es5", "noImplicitAny": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "sourceMap": true, + "inlineSourceMap": true, "declaration": true, - "outDir": "dist", - "rootDir": "src" + "outDir": ".", + "rootDir": "src/ng2-bs3-modal" }, "exclude": [ "typings/main.d.ts", "typings/main", "node_modules", - "dist", - "demo" + "demo", + "bundles", + "components" ] } \ No newline at end of file diff --git a/typings.json b/typings.json new file mode 100644 index 0000000..4e6a035 --- /dev/null +++ b/typings.json @@ -0,0 +1,7 @@ +{ + "dependencies": {}, + "devDependencies": {}, + "ambientDependencies": { + "es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c" + } +}