change editors default file to untitled.lua - add package for LuaFileSystem port
This commit is contained in:
8
penlight/.package
Normal file
8
penlight/.package
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
title = 'Penlight apis',
|
||||
repository = 'kepler155c/opus-apps/{{OPUS_BRANCH}}/penlight',
|
||||
description = [[See: https://github.com/Tieske/Penlight
|
||||
|
||||
Penlight brings together a set of generally useful pure Lua modules, focusing on input data handling (such as reading configuration files), functional programming (such as map, reduce, placeholder expressions, etc), and OS path management. Much of the functionality is inspired by the Python standard libraries.]],
|
||||
license = 'MIT',
|
||||
}
|
||||
1
penlight/etc/fstab
Normal file
1
penlight/etc/fstab
Normal file
@@ -0,0 +1 @@
|
||||
rom/modules/main/pl gitfs Tieske/Penlight/master/lua/pl
|
||||
19
penlight/init/6.penlight.lua
Normal file
19
penlight/init/6.penlight.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
--[[
|
||||
local getfenv = _G.getfenv
|
||||
|
||||
-- penlight requires a global package to determine path separator
|
||||
-- some funky things in penlight regarding global access
|
||||
_G.package = {
|
||||
config = '/\n:\n?\n!\n-',
|
||||
}
|
||||
|
||||
_G.require = function(module)
|
||||
for i = 2, 3 do
|
||||
local env = getfenv(i)
|
||||
if env ~= _G then
|
||||
return env.require(module)
|
||||
end
|
||||
end
|
||||
error('invalid environment for require')
|
||||
end
|
||||
]]
|
||||
Reference in New Issue
Block a user