Faster Chrome extension development cycle
Here is how developing chrome extension works out of the box:
- make a change
- open "extensions" page
- find your extension there
- hit reload
- test the change
Steps 2,3,4 really should not be there. Doing this over an over again just makes me want to stop writing software and get into baby clothes instead.
Turns out I am not the only one to feel that pain. There is an Extenstion Reloader extension that, if combined with Guard, automates those steps.
There is a bit of setup. But really is just a bit, assuming you've got a ruby interpreter and a terminal. It works on OSX and, with minor adjustments, on Linux. Not sure about Windows.
Install guard-shell
gem:
Copied!gem install guard-shell
Add Guardfile
to the root of your project with the following contents:
Copied!guard :shell do
watch /(js|css|html|json)$/ do
`open -g http://reload.extensions`
end
end
In a terminal, cd into project folder and run guard
.
That is it. From now on, while guard is running, changing any file inside your project will result into extensions reload in a background.
One caveat though, looks like Extension Reloader does not reload changes in manifest. Other than that, you got it!