Skip to content

plugin.json

Every plugin has a plugin.json file at its root. It sets the plugin’s name, version, and entry point, along with other details about the plugin.

{
"name": "sketchbook-shader",
"version": "1.2.0",
"description": "Shaders that give your art an animated sketchbook look",
"author": "Jane Doe <jane@example.com>",
"website": "https://example.com/sketchbook-shader",
"license": "MIT",
"main": "index.js",
"exports": {
"common": ["ui.js"],
"web": ["lines.glsl", "flats.glsl", "highlights.glsl", "shadows.glsl"]
}
}

The plugin’s name. It’s used as the name of the bottled .inkb file, and as the prefix for the plugin’s assets.

Your plugin can read its name with getPluginName.

The plugin’s version, as a semantic version.

Required. ink bottle won’t package a plugin without a valid semantic version.

A one-line summary of what the plugin does.

Who made the plugin, and how to contact them. Uses the same format as npm’s package.json: "Jane Doe <jane@example.com>".

The plugin’s web page.

The plugin’s license, as an SPDX identifier like MIT or Apache-2.0. Leave it out if you’re only using the plugin in your own novel.

The path to the plugin’s entry point script.

{
"main": "index.js"
}

Files that keep their original names when your novel is built, listed by platform.

When Inkweaver builds your novel, it renames each file based on its contents. List a file under exports when something outside your plugin needs to find it by name.