XKit

Prerequisites:

Serving Resources Locally

Serving extensions and themes locally is useful for rapid development without requiring the use of the XKit Editor, but some initial set up is required:

  1. Run gulp server to start the resource server. This task will automatically build the extension and theme files from source before the server starts. See gulp server for more information.
  2. Navigate to https://localhost:31337 and create a security exception for the localhost domain. The project uses self-signed SSL/TLS certificates that are untrusted by default in order to work around mixed-content warnings for websites like Tumblr that are served over HTTPS.
  3. Change the relevant lines in xkit.js and manifest.json to point to and allow serving XKit from localhost.
  4. Reload the XKit extension in the browser under test:
  5. Open the XKit settings menu and navigate to Other > Update All and click “Update all my extensions”.

Note: changes to extension and theme files are not automatically propagated to the XKit extension in the browser. Each time changes are made, XKit must be force-updated through “Update all my extensions” before the changes will be reflected.

Scripts:

npm test

Shortcut for eslint ..

npm run dev

Shortcut for gulp server.

npm run build

Uses web-ext build with the necessary file exclusions to build and pack the WebExtension (unsigned).

Gulp Tasks:

gulp (default)

The default task.

See also: gulp build.

gulp build

Top-level build task.

See also: gulp build:extensions, gulp build:themes.

gulp build:extensions

Builds the extension distribution from source, including the JSON-ified extension files, list.json, and gallery.json.

gulp build:themes

Builds the themes distribution from source, including themes.json.

gulp server

Serve extension and theme files locally.