JS: simplify merging kotlin.js
This commit is contained in:
+10
-9
@@ -1,15 +1,16 @@
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('kotlin', [], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
module.exports = factory();
|
||||
} else {
|
||||
root.kotlin = factory();
|
||||
define('kotlin', ['exports'], factory);
|
||||
}
|
||||
}(this, function () {
|
||||
var Kotlin = {};
|
||||
else if (typeof exports === 'object') {
|
||||
factory(module.exports);
|
||||
}
|
||||
else {
|
||||
root.kotlin = {};
|
||||
factory(root.kotlin);
|
||||
}
|
||||
}(this, function (Kotlin) {
|
||||
var _ = Kotlin;
|
||||
|
||||
%output%
|
||||
|
||||
return Kotlin;
|
||||
}));
|
||||
+2
-7
@@ -14,9 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
(function (Kotlin) {
|
||||
'use strict';
|
||||
|
||||
(function () {
|
||||
function toArray(obj) {
|
||||
var array;
|
||||
if (obj == null) {
|
||||
@@ -613,9 +611,6 @@
|
||||
* @param {Object} declaration
|
||||
*/
|
||||
Kotlin.defineModule = function (id, declaration) {
|
||||
if (typeof declaration.$initializer$ === "function") {
|
||||
declaration.$initializer$.call(declaration); // TODO: temporary hack
|
||||
}
|
||||
Kotlin.modules[id] = declaration;
|
||||
};
|
||||
|
||||
@@ -656,4 +651,4 @@
|
||||
Kotlin.kotlinModuleMetadata = function (abiVersion, moduleName, data) {
|
||||
};
|
||||
|
||||
})(Kotlin);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user