Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ A webpack plugin to package chrome extensions (crx) post build

## Usage

### Update webpack.config.js
``` javascript
var Crx = require("crx-webpack-plugin");
module.exports = {
Expand All @@ -17,6 +18,19 @@ module.exports = {
}
```

### Create pem file
Package the extension manually from chrome:

1. Bring up the Extensions management page by going to this URL: chrome://extensions
2. If Developer mode has a + by it, click the +.
Click the Pack extension button. A dialog appears.
3. In the Extension root directory field, specify the path to the extension's folder — for example, c:\myext. (Ignore the other field; you don't specify a private key file the first time you package a particular extension.)
4. Click OK. The packager creates two files: a .crx file, which is the actual extension that can be installed, and a .pem file, which contains the private key.

Warning: **Do not lose the private key! Keep the .pem file secret and in a safe place.** You'll need it later if you want to update the extension or upload the extension using the Chrome Developer Dashboard



## License

MIT (http://www.opensource.org/licenses/mit-license.php)
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function Plugin(options) {
Plugin.prototype.apply = function(compiler) {
var self = this;
self.logger = compiler.getInfrastructureLogger('crx-webpack-plugin');
return compiler.plugin('done', function() {
return compiler.hooks.done.tap('crx-webpack-plugin', function() {
self.package.call(self);
});
}
Expand Down