change editors default file to untitled.lua - add package for LuaFileSystem port

This commit is contained in:
kepler155c@gmail.com
2020-05-17 19:38:29 -06:00
parent 0619eee41c
commit 249414e027
9 changed files with 297 additions and 3 deletions

8
penlight/.package Normal file
View 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
View File

@@ -0,0 +1 @@
rom/modules/main/pl gitfs Tieske/Penlight/master/lua/pl

View 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
]]