Solve #119 Add script for create custom component

This commit is contained in:
Insality
2022-03-09 21:17:24 +02:00
parent 7b8dfb1ef0
commit b84b6c461d
7 changed files with 131 additions and 3 deletions

View File

@@ -68,6 +68,36 @@ function M.get_commands()
}
}
end
},
{
label = "Create Druid Component",
locations = {"Edit"},
query = {
selection = {type = "resource", cardinality = "one"}
},
active = function(opts)
local path = editor.get(opts.selection, "path")
return ends_with(path, ".gui")
end,
run = function(opts)
local file = opts.selection
print("Run script for", editor.get(file, "path"))
return {
{
action = "shell",
command = {
"bash",
"./editor_scripts/create_druid_component.sh",
"." .. editor.get(file, "path")
}
}
}
end
}
}
end