Packets of scripts

LuaFAR for Editor

Packets of scripts


If there is a set of utilities that is distributed as a single unit (“packet of scripts”), it makes sense to install it separately from other scripts.

  • The standard location for adding packets of scripts is <plugin_path>/scripts. It is recommended to install the packet in subdirectory <plugin_path>/scripts/<packet_name>.

  • The plugin modifies package.path by adding at the beginning: <plugin_path>/scripts/?.lua;. (So the user doesn’t have to.)

  • Due to the danger of module names collision, it is not recommended for packet writers to further modify package.path. Instead, start the argument of every require call with <packet_name>. E.g., if the packet is named fl_scripts then do: require 'fl_scripts/utils/read_config'