Skip to content

Commit 627e054

Browse files
authored
Import babel polyfill (danvk#813)
1 parent 87f78fb commit 627e054

File tree

7 files changed

+12
-9
lines changed

7 files changed

+12
-9
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: node_js
22
node_js:
3-
- "0.10"
3+
- "6"
44

55
sudo: false # Use container-based architecture
66
script: >

auto_tests/coverage.html

-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
<div id="graph"></div>
1010
<div id="mocha"></div>
1111

12-
<!-- Polyfills for PhantomJS -->
13-
<script src="../node_modules/babel-core/browser-polyfill.js"></script>
14-
1512
<!-- Mocha -->
1613
<script src="../node_modules/mocha/mocha.js"></script>
1714
<script src="../node_modules/chai/chai.js"></script>

auto_tests/runner.html

-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
<div id="graph"></div>
1010
<div id="mocha"></div>
1111

12-
<!-- Polyfills for PhantomJS -->
13-
<script src="../node_modules/babel-core/browser-polyfill.js"></script>
14-
1512
<!-- Mocha -->
1613
<script src="../node_modules/mocha/mocha.js"></script>
1714
<script src="../node_modules/chai/chai.js"></script>

auto_tests/tests/xhr.js

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
import Dygraph from '../../src/dygraph';
1515
import Util from './Util';
1616

17+
import 'core-js/es6/promise';
18+
1719
function dygraphPromise(div, data, opts) {
1820
return new Promise((resolve, reject) => {
1921
const g = new Dygraph(div, data, opts);

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,8 @@
6060
},
6161
"pre-commit": [
6262
"tests-ok"
63-
]
63+
],
64+
"dependencies": {
65+
"core-js": "^2.4.1"
66+
}
6467
}

scripts/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ browserify \
3434
# Create dist/dygraph.tmp.js.map
3535
cat dist/dygraph.tmp.js | exorcist --base . dist/dygraph.tmp.js.map > /dev/null
3636

37-
header='/*! @license Copyright 2014 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */'
37+
header='/*! @license Copyright 2017 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */'
3838

3939
# Create dist/dygraph.js.min{,.map}
4040
uglifyjs --compress --mangle \

src/dygraph.js

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
4444
*/
4545

46+
// Polyfills
47+
import 'core-js/es6/symbol';
48+
import 'core-js/fn/symbol/iterator';
49+
4650
import DygraphLayout from './dygraph-layout';
4751
import DygraphCanvasRenderer from './dygraph-canvas';
4852
import DygraphOptions from './dygraph-options';

0 commit comments

Comments
 (0)