Permalink
Browse files

Import babel polyfill (#813)

1 parent 87f78fb commit 627e054d1d77a0a8b02ed684b4105c5beafbc52a @danvk committed on GitHub Dec 27, 2016
Showing with 12 additions and 9 deletions.
  1. +1 −1 .travis.yml
  2. +0 −3 auto_tests/coverage.html
  3. +0 −3 auto_tests/runner.html
  4. +2 −0 auto_tests/tests/xhr.js
  5. +4 −1 package.json
  6. +1 −1 scripts/build.sh
  7. +4 −0 src/dygraph.js
View
@@ -1,6 +1,6 @@
language: node_js
node_js:
- - "0.10"
+ - "6"
sudo: false # Use container-based architecture
script: >
@@ -9,9 +9,6 @@
<div id="graph"></div>
<div id="mocha"></div>
- <!-- Polyfills for PhantomJS -->
- <script src="../node_modules/babel-core/browser-polyfill.js"></script>
-
<!-- Mocha -->
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../node_modules/chai/chai.js"></script>
@@ -9,9 +9,6 @@
<div id="graph"></div>
<div id="mocha"></div>
- <!-- Polyfills for PhantomJS -->
- <script src="../node_modules/babel-core/browser-polyfill.js"></script>
-
<!-- Mocha -->
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../node_modules/chai/chai.js"></script>
@@ -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);
View
@@ -60,5 +60,8 @@
},
"pre-commit": [
"tests-ok"
- ]
+ ],
+ "dependencies": {
+ "core-js": "^2.4.1"
+ }
}
View
@@ -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 \
View
@@ -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';

0 comments on commit 627e054

Please sign in to comment.