Skip to content

Latest commit

History

History
26 lines (16 loc) 路 1.79 KB

Chapter 2 - Getting started.md

File metadata and controls

26 lines (16 loc) 路 1.79 KB

Getting started

Prerequisites

CLI commands

  • npm test: Runs all linters. Will report any syntax or style errors.
  • npm test --ignore-scripts: Runs only the addon linter. Only reports syntax and WebExtension API errors.
  • npm run build: Creates an unsigned ZIP of the addon. Useful for debugging issues you can't reproduce.

Web-only development

If you're unable to get set up locally, all you need to do is go to the Actions tab in your fork, then to the Build workflow, and then use "Run workflow" with whichever branch you've made changes to. This will lint and then build the WebExtension for you to download and test! It will give you a ZIP within a ZIP, so be sure to extract from the inner ZIP to avoid extracting everything twice. If there are any major issues, this workflow will fail and tell you what went wrong under the "Lint WebExtension" step.

Loading the project into the browser

The extension source code is located in src/. Before loading your development version, first be sure to disable the release version if you have it installed on the browser you're testing on.

Be sure to reload the extension each time you modify its files, and refresh any open Tumblr tabs in that browser. Otherwise, your changes may not be reflected.