Skip to content

Latest commit

 

History

History
81 lines (56 loc) · 2.3 KB

contributing.org

File metadata and controls

81 lines (56 loc) · 2.3 KB

You might also wanna read ./architecture.org

If you are looking to contribute to spookfox’s development, please follow this guide to setup a development environment.

Assumption: you are on a Linux machine, and have cloned this repo.

Setup

Without Nix

If you don’t have Nix installed, you will need to make sure that following software are available in your $PATH.

  1. Node.js, for building the spookfox add-on

With Nix

If you have Nix installed, you can just do nix-shell to drop into an already setup development environment. Or if you are using direnv, just do a direnv allow to achieve the same.

Install the addon

  1. cd spookfox-addon
  2. yarn
  3. yarn start
  4. Install in Firefox
    1. Open Firefox
    2. Go to about:addons
    3. Click on the gear icon and select ”Debug Add-Ons
    4. Click on ”Load Temporary Add-on” button
    5. Navigate to the spookfox-addon/dist directory, and click Open

Any changes you make to typescript/html/scss now will automatically rebuild. But you will still need to click on Reload button on Debug Add-Ons firefox page.

Install spookfox.el

Using straight.el

You can use straight.el to install it directly from where you’ve clone this repo.

(use-package spookfox
      :straight (spookfox :type git
                          :local-repo "~/Documents/work/spookfox"
                          :files ("lisp/*.el" "lisp/apps/*.el"))
      :config
      (spookfox-init))

This is how I install it in my config.

Tips

Debugging the Firefox addon

  • Access addon’s developer console

    In Firefox go to about:addons, click Gear Icon > Debug Addons > Inspect(in Spookfox box). This will open a developer console where you can see messages logged by the addon. There is also a global variable spookfox (instance of Spookfox class) available which you can play with.

  • Log state-changing events

    To see various levels of logged messages, please set SPOOKFOX_DEBUG to a number b/w 0 and 2 in localStorage i.e

    localStorage.setItem('SPOOKFOX_DEBUG', 1)
        

    0 -> Log errors 1 -> Log information 2 -> Log for debugging