diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2022-11-02 23:28:34 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2022-11-02 23:28:34 -0400 |
commit | 40fc035835d2ba1f9436c15810abce39e29ff7c3 (patch) | |
tree | c37c6e86b203e19f5ca639bd7553fd3d2b5f24cb /src | |
parent | 98a93d36d77cceaf5e94840659ab467c7cb794f1 (diff) | |
download | lite-xl-plugin-manager-40fc035835d2ba1f9436c15810abce39e29ff7c3.tar.gz lite-xl-plugin-manager-40fc035835d2ba1f9436c15810abce39e29ff7c3.zip |
Updated to not generate needless attributes, and updated build commands to accomodate newer setups.
Diffstat (limited to 'src')
-rw-r--r-- | src/lpm.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lpm.lua b/src/lpm.lua index ef02c58..f8b730e 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -745,7 +745,7 @@ function Repository:generate_manifest() for line in io.lines(path .. PATHSEP .. "README.md") do local _, _, name, path, description = line:find("^%s*%|%s*%[`([%w_]+)%??.-`%]%((.-)%).-%|%s*(.-)%s*%|%s*$") if name then - plugin_map[name] = { name = name, description = description, files = {} } + plugin_map[name] = { name = name, description = description } if path:find("^http") then if path:find("%.lua") then plugin_map[name].url = path @@ -762,12 +762,12 @@ function Repository:generate_manifest() end for i, file in ipairs(system.ls(path .. plugin_dir)) do if file:find("%.lua$") then - local plugin = { description = nil, files = {}, name = common.basename(file):gsub("%.lua$", ""), dependencies = {}, mod_version = 3, version = "1.0", tags = {}, path = plugin_dir .. file } + local plugin = { description = nil, name = common.basename(file):gsub("%.lua$", ""), mod_version = 3, version = "1.0", path = plugin_dir .. file } for line in io.lines(path .. plugin_dir .. file) do local _, _, mod_version = line:find("%-%-.*mod%-version:%s*(%w+)") if mod_version then plugin.mod_version = mod_version end local _, _, required_plugin = line:find("require [\"']plugins.([%w_]+)") - if required_plugin then if required_plugin ~= plugin.name then plugin.dependencies[required_plugin] = ">=1.0" end end + if required_plugin then if required_plugin ~= plugin.name then if not plugin.dependencies then plugin.dependencies = {} end plugin.dependencies[required_plugin] = ">=1.0" end end end if plugin_map[plugin.name] then plugin = common.merge(plugin, plugin_map[plugin.name]) @@ -778,7 +778,7 @@ function Repository:generate_manifest() end for k, v in pairs(plugin_map) do if not v.plugin then - table.insert(plugins, common.merge({ dependencies = {}, mod_version = self.branch == "master" and 2 or 3, version = "1.0", tags = {} }, v)) + table.insert(plugins, common.merge({ mod_version = self.branch == "master" and 2 or 3, version = "1.0" }, v)) end end common.write(path .. PATHSEP .. "manifest.json", json.encode({ plugins = plugins })) |