LiveCode Builder extension metadata
In order to package any extension in LiveCode Builder we need to add some required metadata. The metadata provides information about the extension.
The required metadata is
- title: a human-readable name for the module
- author: the name of the author of the module
- version: a string in the form X.Y.Z (with X, Y and Z integers) describing the module version
You can also include an optional description
- description: a simple description of the module’s purpose
If the required metadata is not added, then a number of warnings may be printed into the log field when building and packaging the extension.
Version numbers
We suggest using Semantic Versioning when assigning the version number of the extension.
The uses a version format of X.Y.Z (Major.Minor.Patch).
Given this format you would increment
- The Major version when you make incompatible API changes.
- The Minor version when you add functionality in a backwards-compatible manner.
- The Patch version when you make backwards-compatible bug fixes.
Under this scheme version numbers, and the way they change, provide clear and valuable information about the underlying code and the changes between versions.
For a more detailed explanation of Semantic Versioning see http://semver.org/.
Library metadata
Add the metadata after the library definition in the LCB file
- title: a human-readable name for the module, I have used “Hello World Library” but you can choose any suitable name
- author: add your name as the author of your library
- version number: this is the first version of the library so the version is “1.0.0”
library community.livecode.elanorb.helloworld metadata title is "Hello World Library" metadata author is "Elanor Buchanan" metadata version is "1.0.0" … handler definition end library
The finished library
The library is now complete, including metadata, ready to be installed into LiveCode.
library community.livecode.elanorb.helloworls metadata title is "Hello World Library" metadata author is "Elanor Buchanan" metadata version is "1.0.0" public handler sayHello() return "Hello World!" end handler end library