Registry / web-framework / crx-compiler

crx-compiler

JSON →
library1.1.3jsnpmunverified

CRX Compiler is a CLI tool for building and signing Chrome extensions. It automates TypeScript compilation, packaging into CRX/ZIP formats, and key generation for signing. Current stable version 1.1.3. Designed for developers who need a simple, all-in-one build pipeline for Chrome extensions without manual steps. Differentiators: built-in tsconfig generation, key generation in RSA 2048, and both CRX and ZIP output. Ships TypeScript declarations for API usage.

npm install crx-compiler
INSTALL
IMPORT
SIG · CRX-COMPILER
C
crx-compiler
web-frameworkjavascriptv1.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

crx-compiler (default command)
npx crx-compiler
crx-compiler (without npx if not globally installed)
Use npx for project-local execution if installed as devDependency.
crx-tsc-init
npx crx-tsc-init
crx-tsconfig (deprecated alias, still works)
Generates tsconfig.json. Equivalent to crx-tsconfig.
crx-keygen
npx crx-keygen
Generates key.pem and public_key.pem. Specify custom paths via arguments.
crx-precompile
npx crx-precompile
Prepares files for build; copies from src to pre_dist.

Complete build pipeline: init TS config, precompile, generate keys, and build CRX+ZIP with cleanup.

npx crx-tsc-init -i src -o pre_dist && npx crx-precompile -s src -p pre_dist -c && npx crx-keygen key.pem public.pem && npx crx-compiler -s src -p pre_dist -d dist -k key.pem -C
crx-compiler --version
Debug
Known issues
gotchacrx-compiler requires Node.js 14+ and npm 6+.
fix
Update Node.js to 14 or later, npm to 6 or later.
affects: >=1.0.0
gotchaKey generation uses RSA 2048; public key must be added to manifest.json as 'key' field (base64 without headers).
fix
After crx-keygen, read public_key.pem, convert to base64, and add to manifest.json.
affects: >=1.0.0
deprecatedcrx-tsconfig alias is deprecated. Use crx-tsc-init instead.
fix
Replace crx-tsconfig with crx-tsc-init.
affects: >=1.0.0
gotchaThe --clean flag (uppercase -C) deletes both pre_dist and dist directories; lowercase -c is used for --only-crx. Confusing.
fix
Use -C for clean all, -c for only CRX.
affects: >=1.0.0
gotchaIf key file is missing, crx-compiler fails with an error. Ensure key.pem exists or use --key-file to specify.
fix
Run crx-keygen first or provide path to existing private key.
affects: >=1.0.0
Errors
Common errors & fixes
Error: ENOENT: no such file or directory, open 'pre_dist/manifest.json'
The pre_dist directory does not contain manifest.json, possibly because crx-precompile wasn't run or manifest is in src.
fix
Run crx-precompile or specify manifest path via --manifest.
TypeError: crx-compiler is not a function
Attempting to import crx-compiler as a Node.js module when it is a CLI tool.
fix
Use npx or install globally: npm install -g crx-compiler.
crx-tsconfig: command not found
crx-tsconfig alias is not recognized in newer versions; use crx-tsc-init.
fix
Use crx-tsc-init instead of crx-tsconfig.
Error: Private key not found
The specified key file does not exist at the given path.
fix
Generate keys first with crx-keygen or provide correct path to existing key.
Upgrade
Version history
1.1.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
1
Resources
crx-compiler — npm install crx-compiler · libregistry