electron-compiler

raw JSON →
1.0.9 verified Fri May 01 auth: no javascript abandoned

Build tool that copies an Electron app repository, uglifies JavaScript and CSS, installs dependencies, and packages using electron-packager. Version 1.0.9 is the latest but appears unmaintained since 2016 (no recent updates). Differentiators: combines uglification, minification, and packaging in one CLI. Alternatives: electron-builder, electron-forge. Relies on outdated dependencies like babel 5.x and minifier; not recommended for new projects due to lack of updates and potential security issues with nested dependencies.

error Error: Cannot find module 'babel'
cause babel dependency not installed or outdated.
fix
Run 'npm install' in the electron-compiler directory or use a newer version of the tool.
error Error: ENOENT: no such file or directory, open 'package.json'
cause The specified path does not contain a package.json.
fix
Ensure you provide the correct path to your Electron app root.
gotcha Package uses deprecated babel 5.x for uglification, which may fail with modern JavaScript syntax.
fix Use electron-builder or electron-forge instead.
security colors.js and faker.js supply chain incident (2022) - this package's dependency on colors.js may still be vulnerable.
fix Avoid using this package; update to a maintained alternative.
breaking As of v1.0.1, babel replaced uglify-js; expect different behavior for ES6+ syntax.
fix Ensure your code is transpiled to ES5 or use a modern builder.
npm install electron-compiler
yarn add electron-compiler
pnpm add electron-compiler

Demonstrates installing the CLI and running it on an Electron app directory.

# Install globally
npm install -g electron-compiler

# Run on your app directory
electron-compiler /path/to/electron-app