Skip to main content

The xPack Metadata

Metadata is data that provides information about other data.

The xPack metadata provides information about the package content (executables, links to binary archives), and about development related details (like dependencies, configurations, actions, etc).

The metadata used by xpm is located in the package.json file, and is grouped below the xpack definition.

To increase reusability of definitions, a powerful LiquidJS engine is used to perform substitutions.

The mandatory xpack definitions

To identify a project as an xpm package (xPack), it must have an xpack property, even empty, in the package.json file.

Minimal empty xpack
{
"name": "my-awesome-project",
"version": "1.0.0",
"xpack": {}
}

Although not mandatory, it is also recommended to add an xpack keyword; this may help find the xPacks in the public repository by searching for this keyword.

Recommended keyword
{
"name": "my-awesome-project",
"version": "1.0.0",
"keywords": [
"xpack",
"..."
],
"xpack": {}
}

The extensions are grouped below the xpack object, and may contain the following definitions:

Scalar metadata

The minimumXpmRequired definition

To allow xpm to evolve with future incompatible versions, a mechanism is used to identify the required xpm version for interpreting the current definitions in package.json.

minimumXpmRequired has dual usage:

  • it prevents using an old xpm with a newer package.json
  • it allows a newer xpm to revert some functionality to match the older minimum required xpm.

The mechanism is similar to that used by CMake; the policies are documented in the separate Policies page.

Objects and arrays

  • dependencies
  • devDependencies
  • binaries
  • properties
  • actions
  • buildConfigurations