Move components to extended. Make stubs for ready to make it requirable

This commit is contained in:
Insality
2020-09-21 23:28:20 +03:00
parent 04c39f1ce2
commit 23e2846a60
11 changed files with 97 additions and 80 deletions

View File

@@ -188,4 +188,13 @@ function M.get_border(node)
)
end
-- Show message to require extended component
function M.extended_component(component_name)
print(string.format("[Druid]: The component %s is extended component. You have to register it via druid.register to use it", component_name))
print("[Druid]: Use next code:")
print(string.format('local %s = require("druid.extended.%s")', component_name, component_name))
print(string.format('druid.register("%s", %s)', component_name, component_name))
end
return M