Notwithstanding Previous Misdemeanors

    incompatible-binaries
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.3 • Public • Published

    incompatible-binaries

    Lists or deletes binaries in a directory that aren't compatible with the supplied platform and architecture.

    This can be useful when packaging Electron apps to exclude binaries that are not for the target platform but have been picked up by bundlers like webpack.

    Determines the platform and architecture of a binary via binary-info.

    import {
      listIncompatibleBinaries,
      deleteIncompatibleBinaries,
    } from "incompatible-binaries";
    
    listIncompatibleBinaries("./directory", process.platform, process.arch);
    deleteIncompatibleBinaries("./directory", process.platform, process.arch);

    It can also be used as an Electron Forge plugin which deletes incompatible binaries via the Electron Packager afterPrune hook:

    {
      "config": {
        "forge": {
          "packagerConfig": {},
          "makers": [],
          "plugins": [
            [
              "incompatible-binaries/forge-plugin",
              {
                "dryRun": false
              }
            ]
          ]
        }
      }
    }

    Install

    npm i incompatible-binaries

    DownloadsWeekly Downloads

    0

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    8.78 kB

    Total Files

    11

    Last publish

    Collaborators

    • timfish