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/FILE_STRUCTURE.md
TheBrokenRail 105d3b0933
All checks were successful
ScriptCraft/pipeline/head This commit looks good
Fix File Structures in Documentation
2020-05-24 15:09:14 -04:00

497 B

File Structure

- Jar Root
  - scriptcraft/
    - Source Root
- Source Root
  - ModID/
    - index.js/index.ts
    - Other Modules

Why is an index file necessary?

Because of the way module resolution in ScriptCraft works, you cannot load a module with import 'module-name'; and no index file. Without an index file you would need to use import 'module-name/main'; to load it and specify module-name/main as your entry-point.