electron / electron/rebuild

Introduce API to support arbitrary package builds

Open
#338 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.1k
Forks
181
Avg merge
6h 44m
Merged PRs (30d)
3

Description

`electron-rebuild` only supports building the packages that use either `node-gyp` or `prebuild`. It is rather limited. I was researching the electron infrastructure, and it seems like there are things that are not covered.

I'm proposing to create an API (not a JavaScript or TypeScript kind of an API, but the UNIXy like) to allow rebuilding binary packages with arbitrary build systems, as long as the package itself integrates properly with the system.

In the `package.json`, there's a `prepare` script, that is designed to be used for building the package before it could be used.
It is invoked
- before the package is published,
- after package is installed as a dependency from source (i.e. from git),
- after package dependencies are installed in the package source (i.e. after you `git clone` and `yarn install` / `npm install` something).

Building packages for `electron` is not that different compared to building packages for `node`. In most cases, running the same (`prepare`) build script from the adjusted environment (i.e. with the env vars adjusted for the electron) should be enough.

In fact, the above sounds so simple I'm surprised it's not offered already. Are there any difficulties I'd not foreseen?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.