Consider using crx npm module instead of crxmake.sh
ngyikp opened this issue · 2 comments
ngyikp commented
The bash script can't be easily used on Windows systems, I suggest using the crx module to generate the CRX and the key file if the developer needs to.
Here's a sample Grunt task that I'm using for my extension:
grunt.registerTask('crx', 'Generate crx file for Chrome', function() {
grunt.log.writeln('Generating crx...');
var done = this.async();
var crxFile = new crx({
privateKey: fs.readFileSync(__dirname + '/../key.pem')
});
crxFile.load(__dirname + '/tmp/crx').then(function() {
return crxFile.pack();
}).then(function(crxBuffer) {
fs.writeFile(__dirname + "/dist/out.crx", crxBuffer, function() {
grunt.log.ok('Done!');
done();
});
});
});
matthewgertner commented
Can you submit a pull request?
roman-kaspar commented
Inspired with PR#11, I used grunt-crx
to make the skeleton Windows-friendly.