summaryrefslogtreecommitdiff
path: root/lualibs-basic.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-04 22:24:55 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-04 22:24:55 +0200
commit92c04b971e3ee97f945b462cc1ae6a26b18196d6 (patch)
treec70b99c33f8478f4ab2ec4ffd42273eef849c9b5 /lualibs-basic.lua
parent67744bc1c59803c2645927f15cb30fbbb7365a99 (diff)
downloadlualibs-92c04b971e3ee97f945b462cc1ae6a26b18196d6.tar.gz
add some documentation to ``lualibs-basic.lua`` and ``lualibs-merged.lua``
Diffstat (limited to 'lualibs-basic.lua')
-rw-r--r--lualibs-basic.lua19
1 files changed, 13 insertions, 6 deletions
diff --git a/lualibs-basic.lua b/lualibs-basic.lua
index cd28e75..6c14e9f 100644
--- a/lualibs-basic.lua
+++ b/lualibs-basic.lua
@@ -1,4 +1,6 @@
-lualibs = lualibs or { }
+lualibs = lualibs or { }
+local info = lualibs.info
+local loadmodule = lualibs.loadmodule
local lualibs_basic_module = {
name = "lualibs-basic",
@@ -10,12 +12,8 @@ local lualibs_basic_module = {
license = "See ConTeXt's mreadme.pdf for the license",
}
-local error, warn, info = lualibs.error, lualibs.warn, lualibs.info
+local loaded = false --- track success of package loading
-local loadmodule = lualibs.loadmodule
-local stringformat = string.format
-
-local loaded = false
if lualibs.prefer_merged then
info"Loading merged package for collection “basic”."
loaded = loadmodule('lualibs-basic-merged.lua')
@@ -24,6 +22,15 @@ else
info"Falling back to individual libraries from collection “basic”."
end
+--[[doc--
+
+ \verb|mtx-package| expects the files to be included by
+ \verb|loadmodule|.
+ If run on this file, it will create \verb|lualibs-basic-merged.lua|
+ from all the files mentioned in the next block.
+
+--doc]]--
+
if loaded == false then
loadmodule("lualibs-lua.lua")
loadmodule("lualibs-package.lua")