# gulp-crx-pack

> Pack Chrome Extension in the pipeline.

Latest version **1.0.3** (published 2024-01-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-crx-pack
pnpm add gulp-crx-pack
yarn add gulp-crx-pack
bun add gulp-crx-pack
```

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2024-01-25 |
| First published | 2015-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 31 |
| Author | Pavel Vanecek |
| Maintainers | corkscreewe |
| Keywords | gulpplugin, chrome |

## Links

- npm: https://www.npmjs.com/package/gulp-crx-pack
- Repository: https://github.com/PavelVanecek/gulp-crx
- Issues: https://github.com/PavelVanecek/gulp-crx/issues
- npm.io page: https://npm.io/package/gulp-crx-pack

## Dependencies (5)

- [crx](https://npm.io/package/crx.md) git+https://github.com/oncletom/crx.git
- [merge](https://npm.io/package/merge.md) ^1.2.0
- [vinyl](https://npm.io/package/vinyl.md) ^2.1.0
- [through2](https://npm.io/package/through2.md) ^2.0.1
- [plugin-error](https://npm.io/package/plugin-error.md) ^1.0.1

## Recent versions

- 1.0.3 (latest) — 2024-01-25
- 1.0.2 — 2018-03-15
- 1.0.1 — 2015-11-27

## README

gulp-crx-pack
=============

Pack Chrome Extension in the pipeline.

[![Build Status](https://travis-ci.org/PavelVanecek/gulp-crx.svg?branch=master)](https://travis-ci.org/PavelVanecek/gulp-crx) [![npm version](https://badge.fury.io/js/gulp-crx-pack.svg)](https://badge.fury.io/js/gulp-crx-pack)

Usage
-----

Pipe the folder with chrome extension source code into the plugin.

    var crx = require('gulp-crx-pack');
    var manifest = require('./extension-src/manifest.json');

    gulp.task('crx', function() {
      return gulp.src('./extension-src')
        .pipe(crx({
          privateKey: fs.readFileSync('./certs/key', 'utf8'),
          filename: manifest.name + '.crx'
        }))
        .pipe(gulp.dest('./build'));
    });

Install
-------

    npm install gulp-crx-pack --save-dev

Autoupdating
------------

See https://developer.chrome.com/extensions/autoupdate

You can use `gulp-crx-pack` to generate the `.xml` file too. Pass two more options:
- `codebase`: The URL to final `.crx` file
- `updateXmlFilename`: Name of the xml file.

Example:

    var crx = require('gulp-crx-pack');
    var manifest = require('./extension-src/manifest.json');

    gulp.task('crx', ['prepackage'], function() {

      // http://example.com/extension.crx
      var codebase = manifest.codebase

      var updateXmlFilename = 'update.xml'

      return gulp.src('./extension-src')
        .pipe(crx({
          privateKey: fs.readFileSync('./certs/key', 'utf8'),
          filename: manifest.name + '.crx',
          codebase: codebase,
          updateXmlFilename: updateXmlFilename
        }))
        .pipe(gulp.dest('./build'));
    });

---
_Source: https://npm.io/package/gulp-crx-pack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
