mirror of
https://github.com/konvajs/konva.git
synced 2025-10-08 00:14:23 +08:00
enable es6 export
This commit is contained in:
13
konva.js
13
konva.js
@@ -1,7 +1,8 @@
|
||||
(function (factory) {
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
factory();
|
||||
}(function () { 'use strict';
|
||||
(global = global || self, global.Konva = factory());
|
||||
}(this, function () { 'use strict';
|
||||
|
||||
/*
|
||||
* Konva JavaScript Framework v3.1.4
|
||||
@@ -17091,10 +17092,6 @@
|
||||
_registerNode: _registerNode
|
||||
});
|
||||
|
||||
// add Konva to global variable
|
||||
// umd build will actually do it
|
||||
// but it may now it case of modules and bundlers
|
||||
_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
@@ -5,7 +5,7 @@ import typescript from 'rollup-plugin-typescript2';
|
||||
const pkg = require('./package.json');
|
||||
|
||||
export default {
|
||||
input: `src/index.ts`,
|
||||
input: `src/_UMD.ts`,
|
||||
output: [
|
||||
{
|
||||
file: 'konva.js',
|
||||
|
@@ -1,8 +1,11 @@
|
||||
import * as Konva from './_CoreInternals';
|
||||
const KonvaInternals = require('./_CoreInternals');
|
||||
|
||||
// add Konva to global variable
|
||||
// umd build will actually do it
|
||||
// but it may now it case of modules and bundlers
|
||||
Konva._injectGlobal(Konva);
|
||||
KonvaInternals._injectGlobal(KonvaInternals);
|
||||
|
||||
module.exports = Konva;
|
||||
exports.__esModule = true;
|
||||
exports['default'] = KonvaInternals;
|
||||
|
||||
module.exports = exports['default'];
|
||||
|
3
src/_UMD.ts
Normal file
3
src/_UMD.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import * as Konva from './_FullInternals';
|
||||
|
||||
export default Konva;
|
@@ -1,8 +1,11 @@
|
||||
import * as Konva from './_FullInternals';
|
||||
const Konva = require('./_FullInternals');
|
||||
|
||||
// add Konva to global variable
|
||||
// umd build will actually do it
|
||||
// but it may now it case of modules and bundlers
|
||||
Konva._injectGlobal(Konva);
|
||||
|
||||
module.exports = Konva;
|
||||
exports.__esModule = true;
|
||||
exports['default'] = Konva;
|
||||
|
||||
module.exports = exports['default'];
|
||||
|
@@ -5,7 +5,6 @@
|
||||
"target": "es5",
|
||||
"noEmitOnError": true,
|
||||
"lib": ["es2015", "dom"]
|
||||
// "strict": true
|
||||
},
|
||||
"include": ["src/index.ts", "src/Core.ts"]
|
||||
"include": ["./src/*.ts"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user