mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
back to commonjs
This commit is contained in:
parent
a383b982f3
commit
daed263c6a
14
konva.js
14
konva.js
@ -1,8 +1,7 @@
|
|||||||
(function (global, factory) {
|
(function (factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
||||||
typeof define === 'function' && define.amd ? define(factory) :
|
typeof define === 'function' && define.amd ? define(factory) :
|
||||||
(global = global || self, global.Konva = factory());
|
factory();
|
||||||
}(this, function () { 'use strict';
|
}(function () { 'use strict';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Konva JavaScript Framework v3.1.3
|
* Konva JavaScript Framework v3.1.3
|
||||||
@ -17092,11 +17091,10 @@
|
|||||||
_registerNode: _registerNode
|
_registerNode: _registerNode
|
||||||
});
|
});
|
||||||
|
|
||||||
// add Konva to global viriable
|
// add Konva to global variable
|
||||||
// umd build will actually do it
|
// umd build will actually do it
|
||||||
// but it may now it case of modules and bundlers
|
// but it may now it case of modules and bundlers
|
||||||
_injectGlobal(Konva);
|
_injectGlobal(Konva);
|
||||||
|
module.exports = Konva;
|
||||||
return Konva;
|
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
4
konva.min.js
vendored
4
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,8 +1,8 @@
|
|||||||
import * as Konva from './_CoreInternals';
|
import * as Konva from './_CoreInternals';
|
||||||
|
|
||||||
// add Konva to global viriable
|
// add Konva to global variable
|
||||||
// umd build will actually do it
|
// umd build will actually do it
|
||||||
// but it may now it case of modules and bundlers
|
// but it may now it case of modules and bundlers
|
||||||
Konva._injectGlobal(Konva);
|
Konva._injectGlobal(Konva);
|
||||||
|
|
||||||
export default Konva;
|
module.exports = Konva;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import * as Konva from './_FullInternals';
|
import * as Konva from './_FullInternals';
|
||||||
|
|
||||||
// add Konva to global viriable
|
// add Konva to global variable
|
||||||
// umd build will actually do it
|
// umd build will actually do it
|
||||||
// but it may now it case of modules and bundlers
|
// but it may now it case of modules and bundlers
|
||||||
Konva._injectGlobal(Konva);
|
Konva._injectGlobal(Konva);
|
||||||
|
|
||||||
export default Konva;
|
module.exports = Konva;
|
||||||
|
@ -5,7 +5,7 @@ function equal(val1, val2, message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// try to import only core
|
// try to import only core
|
||||||
let Konva = require('../lib/Core').default;
|
let Konva = require('../lib/Core');
|
||||||
|
|
||||||
// no external shapes
|
// no external shapes
|
||||||
equal(Konva.Rect, undefined, 'no external shapes');
|
equal(Konva.Rect, undefined, 'no external shapes');
|
||||||
@ -15,7 +15,7 @@ let Rect = require('../lib/shapes/Rect').Rect;
|
|||||||
equal(Rect !== undefined, true, 'Rect is defined');
|
equal(Rect !== undefined, true, 'Rect is defined');
|
||||||
|
|
||||||
// now import from package.json
|
// now import from package.json
|
||||||
let NewKonva = require('../').default;
|
let NewKonva = require('../');
|
||||||
|
|
||||||
equal(NewKonva.Rect, Rect, 'Same rects');
|
equal(NewKonva.Rect, Rect, 'Same rects');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user