feat: relative path support for module "files" and require()

This commit is contained in:
hyb1996
2018-01-24 11:14:58 +08:00
parent 5ccf434f1b
commit c8450dfc3a
5 changed files with 96 additions and 157 deletions

View File

@@ -88,3 +88,11 @@ require("__globals__")(__runtime__, this);
__importClass__(android.view.KeyEvent);
__importClass__(com.stardust.autojs.core.util.Shell);
(function(){
var __require__ = require;
require = function(path){
path = files.path(path);
return __require__(path);
};
})();