back to commonjs

This commit is contained in:
Anton Lavrenov 2019-02-27 17:30:47 -05:00
parent a383b982f3
commit daed263c6a
5 changed files with 14 additions and 16 deletions

View File

@ -1,8 +1,7 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
(function (factory) {
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.Konva = factory());
}(this, function () { 'use strict';
factory();
}(function () { 'use strict';
/*
* Konva JavaScript Framework v3.1.3
@ -17092,11 +17091,10 @@
_registerNode: _registerNode
});
// add Konva to global viriable
// add Konva to global variable
// umd build will actually do it
// but it may now it case of modules and bundlers
_injectGlobal(Konva);
return Konva;
_injectGlobal(Konva);
module.exports = Konva;
}));

4
konva.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
import * as Konva from './_CoreInternals';
// add Konva to global viriable
// add Konva to global variable
// umd build will actually do it
// but it may now it case of modules and bundlers
Konva._injectGlobal(Konva);
export default Konva;
module.exports = Konva;

View File

@ -1,8 +1,8 @@
import * as Konva from './_FullInternals';
// add Konva to global viriable
// add Konva to global variable
// umd build will actually do it
// but it may now it case of modules and bundlers
Konva._injectGlobal(Konva);
export default Konva;
module.exports = Konva;

View File

@ -5,7 +5,7 @@ function equal(val1, val2, message) {
}
// try to import only core
let Konva = require('../lib/Core').default;
let Konva = require('../lib/Core');
// 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');
// now import from package.json
let NewKonva = require('../').default;
let NewKonva = require('../');
equal(NewKonva.Rect, Rect, 'Same rects');