folderManaging and organizing scripts with folders

Overview:

This guide will explain how to create organized structures with scripts. Since OpenJS 1.3.0, scripts will get automatically loaded even if they are inside a folder and named main.js/Main.js.

Example:

Output:

circle-info
  • The name of scripts that are inside folders are their folders name (as seen in the output)

  • Required scripts will run under the same environment as the main script, more info here

  • Use the script-class to get the information on the current script (name, path, etc)

  • If you want to jump out of the path via any function that expects a path use ".." Example: Current path: "C:\Folder\CurrentFolder\main.js" Target path: "C\:Folder\someScript.js" Final path: "..\someScript.js""C\:Folder\someScript.js"

Last updated

Was this helpful?