1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | Mock.Util = Util
|
7 | Mock.Random = Random
|
8 | Mock.heredoc = Util.heredoc
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | if (typeof module === 'object' && module.exports) {
|
14 |
|
15 | module.exports = Mock
|
16 |
|
17 | } else if (typeof define === "function" && define.amd) {
|
18 |
|
19 | define(function() {
|
20 | return Mock
|
21 | })
|
22 |
|
23 | } else if (typeof define === "function" && define.cmd) {
|
24 |
|
25 | define(function() {
|
26 | return Mock
|
27 | })
|
28 |
|
29 | }
|
30 |
|
31 |
|
32 | this.Mock = Mock
|
33 | this.Random = Random
|
34 |
|
35 |
|
36 |
|
37 | if (typeof KISSY != 'undefined') {
|
38 | |
39 |
|
40 |
|
41 |
|
42 |
|
43 | Util.each([
|
44 | 'mock', 'components/mock/', 'mock/dist/mock',
|
45 | 'gallery/Mock/0.1.1/',
|
46 | 'gallery/Mock/0.1.2/',
|
47 | 'gallery/Mock/0.1.3/',
|
48 | ], function register(name) {
|
49 | KISSY.add(name, function(S) {
|
50 | Mock.mockjax(S)
|
51 | return Mock
|
52 | }, {
|
53 | requires: ['ajax']
|
54 | })
|
55 | })
|
56 | } |
\ | No newline at end of file |