How to modify source code without re-running cfx and Firefox when debugging an SDK add-on?

前端 未结 1 1800
-上瘾入骨i
-上瘾入骨i 2020-12-17 02:36

I\'m developing a Firefox add-on using Add-on SDK. Up to now, I must close debug process and execute \"cfx run\" after I modified my source code.

So I would like to

相关标签:
1条回答
  • 2020-12-17 03:14

    I am a huge fan of Wladimir Palant's 'Extension Auto-Installer' add-on:

    • blog post: http://adblockplus.org/blog/faster-extension-development-cycle-install-changes-automatically
    • AMO link: https://addons.mozilla.org/en-US/firefox/addon/autoinstaller/

    Once this is installed and configured in Firefox, you can create a shell script to reduce the typing overhead:

    #!/bin/bash
    
    # quick script to build the xpi and pass it on to the
    # extension auto-installer extension running on port 8888
    
    /path/to/addon-sdk/bin/cfx xpi && wget --post-file=add-on-name.xpi http://127.0.0.1:8888/
    

    Every time you run the script, wget posts the freshly built xpi to firefox, which then installs it.

    0 讨论(0)
提交回复
热议问题