migrate back to commonjs

This commit is contained in:
Anton Lavrenov
2023-04-13 23:27:56 -05:00
parent 9fd79e8642
commit 8e955f9dd5
11 changed files with 17707 additions and 17749 deletions

View File

@@ -1,5 +1,5 @@
// try to import only core
const Konva = require('../cmj').default;
const Konva = require('../');
// just do a simple action
const stage = new Konva.Stage();

View File

@@ -5,23 +5,14 @@ function equal(val1, val2, message) {
}
// try to import only core
// import Konva from '../';
import Konva from '../lib/Core.js';
import { Rect } from '../lib/shapes/Rect.js';
import '../lib/index-node.js';
// // no external shapes
// // equal(Konva.Rect, undefined, 'no external shapes');
equal(Rect !== undefined, true, 'Rect is defined');
// import { Rect } from '../lib/shapes/Rect';
// equal(Rect !== undefined, true, 'Rect is defined');
// equal(Konva.Rect, Rect, 'Rect is injected');
// import Konva2 from '../';
// equal(Konva2.Rect, Rect, 'Rect is injected');
// equal(Konva2, Konva, 'Same Konva');
equal(Konva.Rect, Rect, 'Rect is injected');
// // just do a simple action
// const stage = new Konva.Stage();
// stage.toDataURL();
const stage = new Konva.Stage();
stage.toDataURL();