- Download Node.js for your platform.
- Optional: Install Node Version Manager and run
nvm use v8
to travel back in time to a point when the dev server worked perfectly. - Ensure you have the
npm
command available. Test this withnpm --version
. - Install
gulp
globally:npm install -g gulp
. - Install the EditorConfig plugin for your favourite editor. We use this to enforce some style rules not covered by code linting.
- Make a clone of the project, or update an existing copy.
- Install project dependencies with
npm install
.
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:
- Run
gulp server
to start the resource server. This task will automatically build the extension and theme files from source before the server starts. Seegulp server
for more information. - Navigate to
https://localhost:31337
and create a security exception for thelocalhost
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. - Change the relevant lines in xkit.js and manifest.json to point to and allow serving XKit from
localhost
. - Reload the XKit extension in the browser under test:
- Chrome: reload the unpacked extension
- Firefox: reload the temporary add-on
- 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.
Shortcut for eslint .
.
Shortcut for gulp server
.
Uses web-ext build
with the necessary file exclusions to build and pack the WebExtension (unsigned).
The default task.
See also: gulp build
.
Top-level build task.
See also: gulp build:extensions
, gulp build:themes
.
Builds the extension distribution from source, including the JSON-ified extension files, list.json
, and gallery.json
.
Builds the themes distribution from source, including themes.json
.
Serve extension and theme files locally.