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.
- package/demo/test1/demo.json +1 -1
- package/demo/test1/index.js +11 -5
- package/demo/test2/after.js +3 -1
- package/demo/test2/demo.json +1 -1
- package/demo/test2/index.js +4 -2
- package/demo/test2/main.js +7 -4
- package/demo2/test1/index.js +10 -4
- package/demo2/test2/after.js +3 -1
- package/demo2/test2/main.js +7 -4
- package/index.js +155 -547
- package/item.js +462 -0
- package/package.json +2 -2
- package/test.js +79 -68
package/demo/test1/demo.json
CHANGED
package/demo/test1/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var i = 0;
|
|
2
2
|
|
|
3
3
|
function test() {
|
|
4
|
-
console.log("你好
|
|
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("初始化
|
|
24
|
-
}
|
|
27
|
+
console.log("初始化test1");
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
console.log("引用了test1")
|
package/demo/test2/after.js
CHANGED
package/demo/test2/demo.json
CHANGED
package/demo/test2/index.js
CHANGED
|
@@ -3,11 +3,13 @@ class Demo {
|
|
|
3
3
|
}
|
|
4
4
|
var i = 0;
|
|
5
5
|
Demo.prototype.main = function() {
|
|
6
|
-
console.log("我很好
|
|
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")
|
package/demo/test2/main.js
CHANGED
|
@@ -3,11 +3,14 @@ class Demo {
|
|
|
3
3
|
}
|
|
4
4
|
var i = 0;
|
|
5
5
|
Demo.prototype.main = function() {
|
|
6
|
-
console.log("
|
|
6
|
+
console.log("test2 main", i++);
|
|
7
|
+
return i;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
Demo.prototype.init = function(){
|
|
10
|
-
console.log("
|
|
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")
|
package/demo2/test1/index.js
CHANGED
|
@@ -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("初始化
|
|
24
|
-
}
|
|
27
|
+
console.log("初始化test1");
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
console.log("引用了test1")
|
package/demo2/test2/after.js
CHANGED
package/demo2/test2/main.js
CHANGED
|
@@ -3,11 +3,14 @@ class Demo {
|
|
|
3
3
|
}
|
|
4
4
|
var i = 0;
|
|
5
5
|
Demo.prototype.main = function() {
|
|
6
|
-
console.log("
|
|
6
|
+
console.log("test2 main", i++);
|
|
7
|
+
return i;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
Demo.prototype.init = function(){
|
|
10
|
-
console.log("
|
|
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")
|