Updating documentation for modules release

This commit is contained in:
walterhiggins 2013-12-24 22:46:35 +00:00
parent 7f9736223e
commit 60de2ec28a
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,12 @@
# lib directory
This directory contains core scriptcraft files and modules.
* plugin.js - A module which provides support for persistent plugins (plugins which need to save state)
* require.js - The require() function implementation. See [Node.js modules] documentation.
* scriptcraft.js - The core scriptcraft code.
* events.js - Event handling module for use by plugin/module developers.
When `require('modulename')` is called, if a file in the current working directory called 'modulename' is not found then the `lib` folder is the first location that `require()` looks for modules.
[njsmod]: http://nodejs.org/api/modules.html

View file

@ -0,0 +1,13 @@
# scriptcraft root directory
This directory contains the following subdirectories...
* lib - contains core scriptcraft modules and code.
* modules - contains modules for use by others
* plugins - contains plugins (modules which are automatically loaded and globally-namespaced at startup)
If you are a minecraft modder who wants to develop simple mods then the `plugins` location is where you should probably place your .js files.
If you are a minecraft modder who wants to develop more complex mods or provide an API for other modders, then modules intended for use by plugins (your own or others) should probably be placed in the `modules` directory.
The `lib` directory is reserved for use by ScriptCraft. If a module is considered essential for all, or adds significantly useful new functionality to ScriptCraft then it should be placed in the `lib` directory.