Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6916369 commit d14cd90Copy full SHA for d14cd90
tasks/util/plotly_node.mjs
@@ -1,5 +1,5 @@
1
-var fs = require('fs');
2
-var JSDOM = require('jsdom').JSDOM;
+import fs from 'fs';
+import { JSDOM } from 'jsdom';
3
4
var window = new JSDOM('', {
5
runScripts: 'dangerously'
@@ -8,7 +8,7 @@ var window = new JSDOM('', {
8
// Mock things that jsdom doesn't support out-of-the-box
9
window.URL.createObjectURL = function() {};
10
11
-module.exports = function plotlyNode(plotlyPath) {
+export default function plotlyNode(plotlyPath) {
12
// Execute source code by inserting a <script> tag containing it
13
var scriptEl = window.document.createElement('script');
14
scriptEl.textContent = fs.readFileSync(plotlyPath, { encoding: 'utf-8' });
0 commit comments