From: Dan Vanderkam Date: Tue, 27 Dec 2016 15:12:55 +0000 (-0500) Subject: Import babel polyfill (#813) X-Git-Tag: v2.0.0~8 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;ds=sidebyside;h=627e054d1d77a0a8b02ed684b4105c5beafbc52a;p=dygraphs.git Import babel polyfill (#813) --- diff --git a/.travis.yml b/.travis.yml index 198ce97..130ac69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js node_js: - - "0.10" + - "6" sudo: false # Use container-based architecture script: > diff --git a/auto_tests/coverage.html b/auto_tests/coverage.html index e8cd24c..adf2639 100644 --- a/auto_tests/coverage.html +++ b/auto_tests/coverage.html @@ -9,9 +9,6 @@
- - - diff --git a/auto_tests/runner.html b/auto_tests/runner.html index 2f48d5b..7ceb0d0 100644 --- a/auto_tests/runner.html +++ b/auto_tests/runner.html @@ -9,9 +9,6 @@
- - - diff --git a/auto_tests/tests/xhr.js b/auto_tests/tests/xhr.js index 90712fa..ba06e61 100644 --- a/auto_tests/tests/xhr.js +++ b/auto_tests/tests/xhr.js @@ -14,6 +14,8 @@ import Dygraph from '../../src/dygraph'; import Util from './Util'; +import 'core-js/es6/promise'; + function dygraphPromise(div, data, opts) { return new Promise((resolve, reject) => { const g = new Dygraph(div, data, opts); diff --git a/package.json b/package.json index 48b6534..c5a8d0b 100644 --- a/package.json +++ b/package.json @@ -60,5 +60,8 @@ }, "pre-commit": [ "tests-ok" - ] + ], + "dependencies": { + "core-js": "^2.4.1" + } } diff --git a/scripts/build.sh b/scripts/build.sh index 9374a9c..35159e4 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -34,7 +34,7 @@ browserify \ # Create dist/dygraph.tmp.js.map cat dist/dygraph.tmp.js | exorcist --base . dist/dygraph.tmp.js.map > /dev/null -header='/*! @license Copyright 2014 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */' +header='/*! @license Copyright 2017 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */' # Create dist/dygraph.js.min{,.map} uglifyjs --compress --mangle \ diff --git a/src/dygraph.js b/src/dygraph.js index 13c6744..d1629db 100644 --- a/src/dygraph.js +++ b/src/dygraph.js @@ -43,6 +43,10 @@ */ +// Polyfills +import 'core-js/es6/symbol'; +import 'core-js/fn/symbol/iterator'; + import DygraphLayout from './dygraph-layout'; import DygraphCanvasRenderer from './dygraph-canvas'; import DygraphOptions from './dygraph-options';