Use ESM style export (#9)

* ESM style export

* Update version
This commit is contained in:
Chenlei Hu
2024-07-06 17:49:57 -04:00
committed by GitHub
parent ebb0d19da1
commit 2a935df408
2 changed files with 4 additions and 13 deletions

View File

@@ -1,3 +1,4 @@
const global = {};
(function(global) {
// *************************************************************
@@ -14411,16 +14412,6 @@ LGraphNode.prototype.executeAction = function(action)
window.setTimeout(callback, 1000 / 60);
};
}
})(this);
if (typeof exports != "undefined") {
exports.LiteGraph = this.LiteGraph;
exports.LGraph = this.LGraph;
exports.LLink = this.LLink;
exports.LGraphNode = this.LGraphNode;
exports.LGraphGroup = this.LGraphGroup;
exports.DragAndScale = this.DragAndScale;
exports.LGraphCanvas = this.LGraphCanvas;
exports.ContextMenu = this.ContextMenu;
}
})(global);
export const { LiteGraph, LGraph, LLink, LGraphNode, LGraphGroup, DragAndScale, LGraphCanvas, ContextMenu } = global;