KT-3008 Implement AMD, CommonJS and UMD wrappers. Compile stdlib and builtins modules into separate JS files and wrap them in UMD.

This commit is contained in:
Alexey Andreev
2016-04-12 10:36:31 +03:00
parent 95b78e18df
commit 848d7f92fa
14 changed files with 229 additions and 57 deletions
+13
View File
@@ -0,0 +1,13 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define('Kotlin', [], factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root.Kotlin = factory();
}
}(this, function () {
var Kotlin = {};
%output%
return Kotlin;
}));
-1
View File
@@ -14,7 +14,6 @@
* limitations under the License.
*/
var Kotlin = Kotlin || {};
(function (Kotlin) {
"use strict";
-2
View File
@@ -14,8 +14,6 @@
* limitations under the License.
*/
var Kotlin = Kotlin || {};
(function (Kotlin) {
'use strict';
-2
View File
@@ -26,8 +26,6 @@
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
var Kotlin = Kotlin || {};
(function (Kotlin) {
"use strict";