Skip to content

Commit f1810ec

Browse files
committed
Add missing files
1 parent 1133a41 commit f1810ec

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

demo/build.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
({
2+
'baseUrl': './',
3+
4+
'name': 'src/index',
5+
'out': 'main-built.js',
6+
7+
'paths': {
8+
'babel': '../babel-4.6.6.min',
9+
'es6': '../es6'
10+
},
11+
12+
'exclude': ['babel'],
13+
14+
'optimize': 'none',
15+
16+
'pragmasOnSave': {
17+
'excludeBabel': true
18+
}
19+
})

demo/main-built.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
var fetchText, _buildMap = {};
2+
3+
4+
define('es6',[
5+
], function(
6+
) {
7+
return {
8+
load: function (name, req, onload, config) {
9+
},
10+
11+
write: function (pluginName, moduleName, write) {
12+
if (moduleName in _buildMap) {
13+
write.asModule(pluginName + '!' + moduleName, _buildMap[moduleName]);
14+
}
15+
}
16+
}
17+
});
18+
19+
20+
define('es6!src/sum',["exports", "module"], function (exports, module) {
21+
22+
23+
module.exports = function (a, b) {
24+
return a + b;
25+
};
26+
});
27+
28+
define('es6!src/class',["exports", "es6!src/sum"], function (exports, _es6SrcSum) {
29+
30+
31+
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
32+
33+
var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
34+
35+
var sum = _interopRequire(_es6SrcSum);
36+
37+
console.log(sum(1, 2));
38+
39+
var A = function A(a) {
40+
_classCallCheck(this, A);
41+
42+
console.log("Hello " + a);
43+
};
44+
45+
new A("world!");
46+
});
47+
require(['es6!src/class']);
48+
define("src/index", function(){});
49+

0 commit comments

Comments
 (0)