mm_machine 1.9.1 → 1.9.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.
@@ -10,7 +10,7 @@
10
10
  /**
11
11
  * 描述, 用于描述该有什么用的
12
12
  */
13
- "description": "用于测试动态加载、更新、卸载、删除脚本123",
13
+ "description": "用于测试动态加载、更新、卸载、删除脚本",
14
14
  /**
15
15
  * 文件路径, 当调用函数不存在时,会先从文件中加载
16
16
  */
@@ -1,7 +1,7 @@
1
1
  var i = 0;
2
2
 
3
3
  function test() {
4
- console.log("你好123", i++)
4
+ console.log("你好7654321", i++)
5
5
  }
6
6
 
7
7
  function main() {
@@ -12,13 +12,19 @@ function main() {
12
12
  exports.main = main;
13
13
 
14
14
  exports.main_before = function() {
15
- console.log("请求前")
15
+ console.log("test1请求前")
16
16
  }
17
17
 
18
18
  exports.main_after = async function(ret) {
19
- console.log("请求后", ret)
19
+ console.log("test1请求后", ret)
20
+ }
21
+
22
+ exports.load = function() {
23
+ console.log("加载test1");
20
24
  }
21
25
 
22
26
  exports.init = function() {
23
- console.log("初始化test");
24
- }
27
+ console.log("初始化test1");
28
+ }
29
+
30
+ console.log("引用了test1")
@@ -10,4 +10,6 @@ Demo.prototype.init = function(){
10
10
  console.log("初始化test2");
11
11
  }
12
12
 
13
- module.exports = new Demo();
13
+ module.exports = new Demo();
14
+
15
+ console.log("引用了test2 after")
@@ -44,7 +44,7 @@
44
44
  /**
45
45
  * 描述, 用于描述该有什么用的
46
46
  */
47
- "description": "用于测试动态加载、更新、卸载、删除脚本321",
47
+ "description": "用于测试动态加载、更新、卸载、删除脚本",
48
48
  /**
49
49
  * 文件路径, 当调用函数不存在时,会先从文件中加载
50
50
  */
@@ -3,11 +3,13 @@ class Demo {
3
3
  }
4
4
  var i = 0;
5
5
  Demo.prototype.main = function() {
6
- console.log("我很好123", i++);
6
+ console.log("我很好7654321", i++);
7
7
  return i;
8
8
  }
9
9
  Demo.prototype.init = function(){
10
10
  console.log("初始化test2");
11
11
  }
12
12
 
13
- module.exports = new Demo();
13
+ module.exports = new Demo();
14
+
15
+ console.log("引用了test2")
@@ -3,11 +3,14 @@ class Demo {
3
3
  }
4
4
  var i = 0;
5
5
  Demo.prototype.main = function() {
6
- console.log("我很好123", i++);
6
+ console.log("test2 main", i++);
7
+ return i;
7
8
  }
8
9
 
9
- Demo.prototype.init = function(){
10
- console.log("初始化test2");
10
+ Demo.prototype.init = function() {
11
+ console.log("test2 init");
11
12
  }
12
13
 
13
- module.exports = new Demo();
14
+ module.exports = new Demo();
15
+
16
+ console.log("引用了test2 main")
@@ -12,13 +12,19 @@ function main() {
12
12
  exports.main = main;
13
13
 
14
14
  exports.main_before = function() {
15
- console.log("请求前")
15
+ console.log("test1请求前")
16
16
  }
17
17
 
18
18
  exports.main_after = async function(ret) {
19
- console.log("请求后", ret)
19
+ console.log("test1请求后", ret)
20
+ }
21
+
22
+ exports.load = function() {
23
+ console.log("加载test1");
20
24
  }
21
25
 
22
26
  exports.init = function() {
23
- console.log("初始化test");
24
- }
27
+ console.log("初始化test1");
28
+ }
29
+
30
+ console.log("引用了test1")
@@ -10,4 +10,6 @@ Demo.prototype.init = function(){
10
10
  console.log("初始化test2");
11
11
  }
12
12
 
13
- module.exports = new Demo();
13
+ module.exports = new Demo();
14
+
15
+ console.log("引用了test2 after")
@@ -3,11 +3,14 @@ class Demo {
3
3
  }
4
4
  var i = 0;
5
5
  Demo.prototype.main = function() {
6
- console.log("我很好123", i++);
6
+ console.log("test2 main", i++);
7
+ return i;
7
8
  }
8
9
 
9
- Demo.prototype.init = function(){
10
- console.log("初始化test2");
10
+ Demo.prototype.init = function() {
11
+ console.log("test2 init");
11
12
  }
12
13
 
13
- module.exports = new Demo();
14
+ module.exports = new Demo();
15
+
16
+ console.log("引用了test2 main")