@waqasibrahim/gulp-crx

1.0.1 • Public • Published

gulp-crx

Create a CRX file for Chrome or Opera using gulp

Inspired from gulp-crx, Still works but is inactive? Uses old version of crx and the generated crx files don't work in Opera.

Installation

Using yarn

yarn add @waqasibrahim/gulp-crx --dev

Using npm

npm install @waqasibrahim/gulp-crx --save-dev

Usage

const crx = require('@waqasibrahim/gulp-crx');
const { name, version } = require('./package');

const sourceDir = 'extension';
const distDir = 'dist';

gulp.task('crx', () => gulp.src(sourceDir)
    .pipe(crx({
        privateKey: fs.readFileSync('./keys/key.pem', 'utf8'),
        filename: `${name}_${version}.crx`,
    }))
    .pipe(gulp.dest(distDir)));

Keys

You can create a key and extension ID for the manifest:

openssl genrsa 2048 | openssl pkcs8 -topk8 -nocrypt -out key.pem

Key:

openssl rsa -in key.pem -pubout -outform DER | openssl base64 -A

Extension ID:

openssl rsa -in key.pem -pubout -outform DER | shasum -a 256 | head -c32 | tr 0-9a-f a-p

Readme

Keywords

Package Sidebar

Install

npm i @waqasibrahim/gulp-crx

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

2.9 kB

Total Files

3

Last publish

Collaborators

  • waqasibrahim