From 7f77b8f06944a887c4b6e33593fdf5ef7fcfb3f4 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Fri, 9 Sep 2016 09:50:13 -0500 Subject: [PATCH] Package --- package.json | 8 +++++--- tsconfig-esm.json | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 tsconfig-esm.json diff --git a/package.json b/package.json index a5bc56c50..62e2c7a4c 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,12 @@ "version": "1.3.21", "description": "Native plugin wrappers for Cordova and Ionic with TypeScript, ES6+, Promise and Observable support", "main": "dist/index.js", + "module": "dist/esm/index.js", "files": [ "dist" ], "dependencies": { - "rxjs": "^5.0.0-beta.6" + "@reactivex/rxjs": "^5.0.0-beta.11" }, "devDependencies": { "browserify": "^13.0.1", @@ -41,7 +42,7 @@ "tsify": "~1.0.4", "tslint": "^3.8.1", "tslint-ionic-rules": "0.0.5", - "typescript": "^1.8.10", + "typescript": "^2.0.2", "watchify": "~3.7.0" }, "scripts": { @@ -50,8 +51,9 @@ "start": "npm run test:watch", "lint": "./node_modules/.bin/gulp lint", "watch": "./node_modules/.bin/tsc -w", - "build": "npm run lint && npm run build:js && npm run build:bundle && npm run build:minify", + "build": "npm run lint && npm run build:js && npm run build:esm && npm run build:bundle && npm run build:minify", "build:js": "./node_modules/.bin/tsc", + "build:esm": "./node_modules/.bin/tsc -p ./tsconfig-esm.json", "build:bundle": "./node_modules/.bin/browserify dist/index.js > dist/ionic.native.js", "build:minify": "./node_modules/.bin/gulp minify:dist", "changelog": "./node_modules/.bin/conventional-changelog -p angular -i CHANGELOG.md -s -r 0", diff --git a/tsconfig-esm.json b/tsconfig-esm.json new file mode 100644 index 000000000..7fb860b6c --- /dev/null +++ b/tsconfig-esm.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "es2015", + "target": "ES5", + "sourceMap": true, + "declaration": true, + "experimentalDecorators": true, + "outDir": "dist/esm", + "moduleResolution": "node" + }, + "files": [ + "typings/es6-shim/es6-shim.d.ts", + "src/index.ts" + ] +}