Transforms
The following is a basic example of a skill:
Configs
Configs are added through the configs
property. Each config can have an optional alias
which makes it easy to reference them in transforms. If no alias
is provided, configs must be referenced in transforms by their filename
. The config
property is the value of the initial config before any transformations are applied.
Transforms
Transforms are what transform the skill's config to be compatible with another skill. In the example above, the react
transform is transforming the eslint
skill's config to be compatible with the eslint
skill. Transforms always transform their own configs. They also always return a the finally transformed skill.
So transforms take a skill as input and return a skill as output.
Extending Configs
Alfred skills have helpers functions that make writing skills easy. The extendConfig
helper allows you to extend configs.
Serializing Configs
Serializing configs which cannot be serialized easily. This is done with the serialize
. Here is an example: