Skip to content

DarkTornado/RhinoRequire.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

RhinoRequire.js

© 2020-2022 Dark Tornado, All rights reserved.

How to use? / 사용법

  • Execute require.js via .evaluateString(); method in org.mozilla.javascript.Context class before executing your source.
  • 다른 소스를 실행하기 전에 org.mozilla.javascript.Context 클래스에 있는 .evaluateString(); 메소드 등을 통해 require.js을 실행하면 되는거에요.

Example / 예시

org.mozilla.javascript.Context rhino = org.mozilla.javascript.Context.enter();
rhino.setOptimizationLevel(-1);
rhino.setLanguageVersion(org.mozilla.javascript.Context.VERSION_ES6);
Scriptable scope = new ImporterTopLevel(rhino);  //or Scriptable scope = rhino.initStandardObjects();
rhino.evaluateString(scope, "require.js's source", "JavaScript", 1, null);  //Execute require.js before executing your source.
rhino.evaluateString(scope, "Your JS Source", "JavaScript", 1, null);
org.mozilla.javascript.Context.exit();

License / 라이선스

About

require(); function implemented via Javascript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published