setRequirePath.lua 948 B

123456789101112131415161718192021222324252627
  1. return {
  2. tag = 'filesystem-lua',
  3. summary = 'Set the require path.',
  4. description = [[
  5. Sets the require path. The require path is a semicolon-separated list of patterns that LÖVR
  6. will use to search for files when they are `require`d. Any question marks in the pattern will
  7. be replaced with the module that is being required. It is similar to Lua\'s `package.path`
  8. variable, except the patterns will be checked using `lovr.filesystem` APIs. This allows
  9. `require` to work even when the project is packaged into a zip archive, or when the project is
  10. launched from a different directory.
  11. ]],
  12. arguments = {
  13. path = {
  14. type = 'string',
  15. default = 'nil',
  16. description = 'An optional semicolon separated list of search patterns.'
  17. }
  18. },
  19. returns = {},
  20. variants = {
  21. {
  22. arguments = { 'path' },
  23. returns = {}
  24. }
  25. },
  26. notes = 'The default reqiure path is \'?.lua;?/init.lua\'.'
  27. }