From 4c31974cb2192c152e46d754c585291b427e1158 Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Thu, 13 Oct 2016 18:39:40 -0700 Subject: [PATCH] feat(typescript): remove dependency to 3rd party es2015 definition (#2027) closes #2016 --- package.json | 4 ++-- spec/tsconfig.json | 10 +++++++++- typings.json | 5 +---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 100adc509d..66252b7102 100644 --- a/package.json +++ b/package.json @@ -70,10 +70,10 @@ "copy_src_cjs": "mkdirp ./dist/cjs/src && shx cp -r ./src/* ./dist/cjs/src", "copy_src_es6": "mkdirp ./dist/es6/src && shx cp -r ./src/* ./dist/es6/src", "commit": "git-cz", - "compile_dist_cjs": "tsc typings/globals/es6-shim/index.d.ts ./dist/cjs/src/Rx.ts ./dist/cjs/src/add/observable/of.ts -m commonjs --sourceMap --outDir ./dist/cjs --target ES5 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --suppressImplicitAnyIndexErrors --moduleResolution node", + "compile_dist_cjs": "tsc ./dist/cjs/src/Rx.ts ./dist/cjs/src/add/observable/of.ts -m commonjs --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --sourceMap --outDir ./dist/cjs --target ES5 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --suppressImplicitAnyIndexErrors --moduleResolution node", "compile_dist_es6": "tsc ./dist/es6/src/Rx.ts ./dist/es6/src/add/observable/of.ts -m es2015 --sourceMap --outDir ./dist/es6 --target ES6 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --suppressImplicitAnyIndexErrors --moduleResolution node", "compile_dist_es6_for_docs": "tsc ./dist/es6/src/Rx.ts ./dist/es6/src/add/observable/of.ts ./dist/es6/src/MiscJSDoc.ts -m es2015 --sourceMap --outDir ./dist/es6 --target ES6 -d --diagnostics --pretty --noImplicitAny --noImplicitReturns --suppressImplicitAnyIndexErrors --moduleResolution node", - "cover": "shx rm -rf dist/cjs && tsc typings/globals/es6-shim/index.d.ts src/Rx.ts src/add/observable/of.ts -m commonjs --outDir dist/cjs --sourceMap --target ES5 -d && nyc --reporter=lcov --reporter=html --exclude=spec/support/**/* --exclude=spec-js/**/* --exclude=node_modules mocha --opts spec/support/default.opts spec-js", + "cover": "shx rm -rf dist/cjs && tsc src/Rx.ts src/add/observable/of.ts -m commonjs --lib es5,es2015.iterable,es2015.collection,es2015.promise,dom --outDir dist/cjs --sourceMap --target ES5 -d && nyc --reporter=lcov --reporter=html --exclude=spec/support/**/* --exclude=spec-js/**/* --exclude=node_modules mocha --opts spec/support/default.opts spec-js", "decision_tree_widget": "cd doc/decision-tree-widget && npm run build && cd ../..", "doctoc": "doctoc CONTRIBUTING.md", "generate_packages": "node .make-packages.js", diff --git a/spec/tsconfig.json b/spec/tsconfig.json index 182a705625..bb3d0fb553 100644 --- a/spec/tsconfig.json +++ b/spec/tsconfig.json @@ -7,7 +7,15 @@ "allowJs": true, "target": "es5", "module": "commonjs", - "outDir": "../spec-js" + "outDir": "../spec-js", + "lib": [ + "es5", + "es2015.core", + "es2015.collection", + "es2015.iterable", + "es2015.promise", + "dom" + ] }, "formatCodeOptions": { "indentSize": 2, diff --git a/typings.json b/typings.json index 62dc7f0eaf..fdf5194f8c 100644 --- a/typings.json +++ b/typings.json @@ -7,9 +7,6 @@ "sinon-chai": "registry:npm/sinon-chai#2.8.0+20160310030142" }, "globalDevDependencies": { - "mocha": "registry:env/mocha#2.2.5+20160723033700" - }, - "globalDependencies": { - "es6-shim": "registry:dt/es6-shim#0.31.2+20160602141504" + "mocha": "registry:env/mocha#2.2.5+20160926180742" } }