From 60de2ec28ad893568e491e3e9356d99c066e9fda Mon Sep 17 00:00:00 2001 From: walterhiggins Date: Tue, 24 Dec 2013 22:46:35 +0000 Subject: [PATCH] Updating documentation for modules release --- src/main/javascript/lib/readme.md | 12 ++++++++++++ src/main/javascript/readme.md | 13 +++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 src/main/javascript/lib/readme.md create mode 100644 src/main/javascript/readme.md diff --git a/src/main/javascript/lib/readme.md b/src/main/javascript/lib/readme.md new file mode 100644 index 0000000..972a966 --- /dev/null +++ b/src/main/javascript/lib/readme.md @@ -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 diff --git a/src/main/javascript/readme.md b/src/main/javascript/readme.md new file mode 100644 index 0000000..ba82601 --- /dev/null +++ b/src/main/javascript/readme.md @@ -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.