- Install web-ext:
npm install
- Run
npx web-ext run
to start the extension in a new Firefox instance- Dev Tool: Navigate to
about:debugging
and clickThis Firefox
thenInspect
to open the developer tools for the extension
- Dev Tool: Navigate to
- Run
npx web-ext run -t chromium
to start the extension in a new Chromium instance- Dev Tool: Navigate to
chrome://extensions
and toggleDeveloper mode
then clickInspect views: background page
to open the developer tools for the extension
- Dev Tool: Navigate to
- For debugging use the commands listed above but add the option
--devtools
. This will automatically bring up the developers console.
- from the project directory, run
xcrun /Applications/Xcode.app/Contents/Developer/usr/bin/safari-web-extension-converter [PATH TO EXTENSION DIRECTORY]
. This will create a build folder in your project directory and open Xcode. - From Xcode (NOT YOUR USUAL IDE), delete the build folder that was created in the step above. Then
run
the project as amacos
application. This will build the extension for you and give you a pop-up saying to quit and open Safari preferences.- NOTE: You must have
Developer
turn on and allow unsigned extensions to be run. Allowing unsigned extensions must be enabled every time you start a new Safari window.
- NOTE: You must have
- Enable the extension and begin testing/debugging.