mm_machine 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,30 +1,30 @@
1
- var i = 0;
2
-
3
- function test() {
4
- console.log("你好123", i++)
5
- }
6
-
7
- function main() {
8
- test();
9
- return i;
10
- }
11
-
12
- exports.main = main;
13
-
14
- exports.main_before = function() {
15
- console.log("test1请求前")
16
- }
17
-
18
- exports.main_after = async function(ret) {
19
- console.log("test1请求后", ret)
20
- }
21
-
22
- exports.load = function() {
23
- console.log("加载test1");
24
- }
25
-
26
- exports.init = function() {
27
- console.log("初始化test1");
28
- }
29
-
1
+ var i = 0;
2
+
3
+ function test() {
4
+ console.log("你好123", i++)
5
+ }
6
+
7
+ function main() {
8
+ test();
9
+ return i;
10
+ }
11
+
12
+ exports.main = main;
13
+
14
+ exports.main_before = function() {
15
+ console.log("test1请求前")
16
+ }
17
+
18
+ exports.main_after = async function(ret) {
19
+ console.log("test1请求后", ret)
20
+ }
21
+
22
+ exports.load = function() {
23
+ console.log("加载test1");
24
+ }
25
+
26
+ exports.init = function() {
27
+ console.log("初始化test1");
28
+ }
29
+
30
30
  console.log("引用了test1")
@@ -1,15 +1,15 @@
1
- class Demo {
2
- constructor() {}
3
- }
4
- var i = 0;
5
- Demo.prototype.main = function() {
6
- console.log("我很好123", i++);
7
- return i;
8
- }
9
- Demo.prototype.init = function(){
10
- console.log("初始化test2");
11
- }
12
-
13
- module.exports = new Demo();
14
-
1
+ class Demo {
2
+ constructor() {}
3
+ }
4
+ var i = 0;
5
+ Demo.prototype.main = function() {
6
+ console.log("我很好123", i++);
7
+ return i;
8
+ }
9
+ Demo.prototype.init = function(){
10
+ console.log("初始化test2");
11
+ }
12
+
13
+ module.exports = new Demo();
14
+
15
15
  console.log("引用了test2 after")
@@ -1,68 +1,68 @@
1
- [{
2
- /**
3
- * 名称, 由中英文和下“_”组成, 用于卸载接口 例如: demo
4
- */
5
- "name": "demo2",
6
- /**
7
- * 标题, 介绍作用
8
- */
9
- "title": "示例脚本2",
10
- /**
11
- * 描述, 用于描述该有什么用的
12
- */
13
- "description": "用于测试动态加载、更新、卸载、删除脚本",
14
- /**
15
- * 文件路径, 当调用函数不存在时,会先从文件中加载
16
- */
17
- "func_file": "./main.js",
18
- /**
19
- * 回调函数名 用于决定调用脚本的哪个函数
20
- */
21
- "func_name": "",
22
- /**
23
- * 排序
24
- */
25
- "sort": 10,
26
- /**
27
- * 状态, 0表示未启用, 1表示启用
28
- */
29
- "state": 1,
30
- /**
31
- * 显示, 0表示不显示, 1表示显示
32
- */
33
- "show": 0
34
- },
35
- {
36
- /**
37
- * 名称, 由中英文和下“_”组成, 用于卸载接口 例如: demo
38
- */
39
- "name": "demo3",
40
- /**
41
- * 标题, 介绍作用
42
- */
43
- "title": "示例脚本3",
44
- /**
45
- * 描述, 用于描述该有什么用的
46
- */
47
- "description": "用于测试动态加载、更新、卸载、删除脚本",
48
- /**
49
- * 文件路径, 当调用函数不存在时,会先从文件中加载
50
- */
51
- "func_file": "./after.js",
52
- /**
53
- * 回调函数名 用于决定调用脚本的哪个函数
54
- */
55
- "func_name": "main",
56
- /**
57
- * 排序
58
- */
59
- "sort": 10,
60
- /**
61
- * 状态, 0表示未启用, 1表示启用
62
- */
63
- "state": 1,
64
- /**
65
- * 显示, 0表示不显示, 1表示显示
66
- */
67
- "show": 0
1
+ [{
2
+ /**
3
+ * 名称, 由中英文和下“_”组成, 用于卸载接口 例如: demo
4
+ */
5
+ "name": "demo2",
6
+ /**
7
+ * 标题, 介绍作用
8
+ */
9
+ "title": "示例脚本2",
10
+ /**
11
+ * 描述, 用于描述该有什么用的
12
+ */
13
+ "description": "用于测试动态加载、更新、卸载、删除脚本",
14
+ /**
15
+ * 文件路径, 当调用函数不存在时,会先从文件中加载
16
+ */
17
+ "func_file": "./main.js",
18
+ /**
19
+ * 回调函数名 用于决定调用脚本的哪个函数
20
+ */
21
+ "func_name": "",
22
+ /**
23
+ * 排序
24
+ */
25
+ "sort": 10,
26
+ /**
27
+ * 状态, 0表示未启用, 1表示启用
28
+ */
29
+ "state": 1,
30
+ /**
31
+ * 显示, 0表示不显示, 1表示显示
32
+ */
33
+ "show": 0
34
+ },
35
+ {
36
+ /**
37
+ * 名称, 由中英文和下“_”组成, 用于卸载接口 例如: demo
38
+ */
39
+ "name": "demo3",
40
+ /**
41
+ * 标题, 介绍作用
42
+ */
43
+ "title": "示例脚本3",
44
+ /**
45
+ * 描述, 用于描述该有什么用的
46
+ */
47
+ "description": "用于测试动态加载、更新、卸载、删除脚本",
48
+ /**
49
+ * 文件路径, 当调用函数不存在时,会先从文件中加载
50
+ */
51
+ "func_file": "./after.js",
52
+ /**
53
+ * 回调函数名 用于决定调用脚本的哪个函数
54
+ */
55
+ "func_name": "main",
56
+ /**
57
+ * 排序
58
+ */
59
+ "sort": 10,
60
+ /**
61
+ * 状态, 0表示未启用, 1表示启用
62
+ */
63
+ "state": 1,
64
+ /**
65
+ * 显示, 0表示不显示, 1表示显示
66
+ */
67
+ "show": 0
68
68
  }]
@@ -1,16 +1,16 @@
1
- class Demo {
2
- constructor() {}
3
- }
4
- var i = 0;
5
- Demo.prototype.main = function() {
6
- console.log("test2 main", i++);
7
- return i;
8
- }
9
-
10
- Demo.prototype.init = function() {
11
- console.log("test2 init");
12
- }
13
-
14
- module.exports = new Demo();
15
-
1
+ class Demo {
2
+ constructor() {}
3
+ }
4
+ var i = 0;
5
+ Demo.prototype.main = function() {
6
+ console.log("test2 main", i++);
7
+ return i;
8
+ }
9
+
10
+ Demo.prototype.init = function() {
11
+ console.log("test2 init");
12
+ }
13
+
14
+ module.exports = new Demo();
15
+
16
16
  console.log("引用了test2 main")