targets.lua 673 B

1234567891011121314151617181920212223242526272829
  1. -- imports
  2. import("core.project.config")
  3. import("core.project.project")
  4. import("core.base.json")
  5. -- main entry
  6. function main ()
  7. -- load config
  8. config.load()
  9. -- print targets
  10. local names = {}
  11. for name, _ in pairs((project.targets())) do
  12. table.insert(names, name)
  13. end
  14. table.sort(names)
  15. if json.mark_as_array then
  16. json.mark_as_array(names)
  17. end
  18. local localjson = json.encode(names)
  19. -- denote the start of vscode information to ignore anything logging to stdout before this point
  20. print("__begin__")
  21. print(localjson)
  22. -- print end tag to ignore other deprecated/warnings infos
  23. print("__end__")
  24. end