Headless Command
The headless command is simply a Template UI Command without UI.
Use APIs exported from "@kksh/api/headless"
.
Some APIs for rendering UI are removed in "@kksh/api/headless"
.
It’s useful for some simple tasks without needing to open a new page.
Run the project scaffolding command to create a new project with Worker Template Extension.
package.json
Sample UUID Extension
This simple extension simply generates a UUID v4 and copies it to the clipboard.
Thus why "clipboard:write-text"
permission is required in package.json
.
HeadlessWorkerExtension
is the base class for headless commands.