This repository has been archived on 2023-11-26. You can view files and clone it, but cannot push or open issues or pull requests.
ScriptCraft/docs/MODULE_RESOLUTION.md

11 lines
607 B
Markdown
Raw Normal View History

2020-05-24 18:09:25 +00:00
# Module Resolution
All ScriptCraft mods have a folder called ```scriptcraft``` in the root of their JAR file, when ScriptCraft is loaded all of these are combined to form a single "virtual" root. It is recommended to use namespaces to avoid conflicts with other mods.
## Supported File Types
- ```.js```
2020-05-26 14:13:09 +00:00
- ```.mjs```
2020-05-24 18:09:25 +00:00
- ```.json```
## Extra Details
2020-05-31 17:51:21 +00:00
- If the import path is a folder, ScriptCraft will load the ```index``` file, and if it doesn't exist it will try to load ```<Folder>/index```.
- If the specified import does not exist, it will try to load the import appended with each supported file type.