Skip to content

Commit d14cd90

Browse files
committed
use es6 in tasks/util/plotly_node.mjs
1 parent 6916369 commit d14cd90

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tasks/util/plotly_node.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
var fs = require('fs');
2-
var JSDOM = require('jsdom').JSDOM;
1+
import fs from 'fs';
2+
import { JSDOM } from 'jsdom';
33

44
var window = new JSDOM('', {
55
runScripts: 'dangerously'
@@ -8,7 +8,7 @@ var window = new JSDOM('', {
88
// Mock things that jsdom doesn't support out-of-the-box
99
window.URL.createObjectURL = function() {};
1010

11-
module.exports = function plotlyNode(plotlyPath) {
11+
export default function plotlyNode(plotlyPath) {
1212
// Execute source code by inserting a <script> tag containing it
1313
var scriptEl = window.document.createElement('script');
1414
scriptEl.textContent = fs.readFileSync(plotlyPath, { encoding: 'utf-8' });

0 commit comments

Comments
 (0)