我想为我的chrome扩展重新加载每次我保存在扩展文件夹中的文件,而不必显式点击“重新加载”在chrome://extensions/。这可能吗?

编辑:我知道我可以更新Chrome重新加载扩展的间隔,这是一个中途的解决方案,但我宁愿让我的编辑器(emacs或textmate)触发保存重新加载或要求Chrome监控目录的变化。


当前回答

我已经分叉LiveJS,以允许实时重新加载打包的应用程序。只需将文件包含在应用程序中,每次保存文件时,应用程序将自动重载。

其他回答

刚刚发现了一个新的基于grunt的项目,它提供了引导,脚手架,一些自动预处理功能,以及自动重新加载(不需要交互)。

从Websecurify引导您的Chrome扩展

作者推荐该webpack插件的下一个版本:https://github.com/rubenspgcavalcante/webpack-extension-reloader。这对我来说很有效。

我已经分叉LiveJS,以允许实时重新加载打包的应用程序。只需将文件包含在应用程序中,每次保存文件时,应用程序将自动重载。

你可以使用Chrome的“Extensions Reloader”:

Reloads all unpacked extensions using the extension's toolbar button or by browsing to "http://reload.extensions" If you've ever developed a Chrome extension, you might have wanted to automate the process of reloading your unpacked extension without the need of going through the extensions page. "Extensions Reloader" allows you to reload all unpacked extensions using 2 ways: 1 - The extension's toolbar button. 2 - Browsing to "http://reload.extensions". The toolbar icon will reload unpacked extensions using a single click. The "reload by browsing" is intended for automating the reload process using "post build" scripts - just add a browse to "http://reload.extensions" using Chrome to your script, and you'll have a refreshed Chrome window.

更新:截至2015年1月14日,扩展是开源的,可在GitHub上使用。

你的内容文件,如html和清单文件是不能改变没有安装扩展,但我相信JavaScript文件是动态加载,直到扩展已经打包。

我知道这是因为当前的项目,我通过Chrome扩展API工作,似乎每次我刷新一个页面加载。