npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@angablue/exe

v3.2.3

Published

Build a portable binary for Windows systems using Vercel's pkg

Downloads

378

Readme

Build a portable binary for Windows systems using Node's SEA. This project serves to and aid in automating bundling your source code with @vercel/ncc and modifying the executable properties post build with resedit-js.

🏠 Homepage

Install

Install this package and save to devDependencies using your package manager of choice.

npm i -D @angablue/exe

⚠️Warning⚠️: This package is only supported on Windows systems running Node v20.0.0 or newer. For older versions of Node (v12.0.0 or newer), please use the version v2.1.3 of this package

npm i -D @angablue/[email protected]

Please note that the older version of this package is no longer maintained. Refer to the previous documentation here.

CLI Usage

Point to a JSON configuration file (default exe.json) to build your executable:

npx exe exe.json

Configuration File

Create a JSON configuration file (exe.json) with the following options:

{
    "entry": "index.js",
    "out": "My Cool App.exe"
}

@angablue/exe has first-class TypeScript support. You can use it in your TypeScript projects without any additional configuration by specifying your TypeScript entry file (such as index.ts).

Optionally, you can specify more arguments and completely customise the resultant executable:

{
    "entry": "index.js",
    "out": "My Cool App.exe",
    "skipBundle": false,
    "version": "{package:version}",
    "icon": "icon.ico",
    "executionLevel": "asInvoker",
    "properties": {
        "FileDescription": "{package:description}",
        "ProductName": "My Cool App",
        "LegalCopyright": "Copyright {package:author.name}",
        "OriginalFilename": "{package:name}"
    }
}

API Usage

If you prefer to use this package programmatically, you can import this module into your Node.js script:

// build.js
const exe = require("@angablue/exe");

const build = exe({
  entry: "./index.js",
  out: "./build/My Cool App.exe",
});

build.then(() => console.log("Build completed!"));

Example Usage

Specify more arguments and completely customise the resultant executable.

// build.js
const exe = require("@angablue/exe");

const build = exe({
  entry: "./index.js",
  out: "./build/My Cool App.exe",
  skipBundle: false,
  version: "2.4.2",
  icon: "./assets/icon.ico", // Application icons must be in .ico format
  executionLevel: "asInvoker",
  properties: {
    FileDescription: "My Cool App",
    ProductName: "My Cool App",
    LegalCopyright: "AngaBlue https://anga.blue",
    OriginalFilename: "My Cool App.exe",
  },
});

build.then(() => console.log("Build completed!"));

Configuration Options

| Option | Description | Required | Default Value | Example Value | Possible Values | | ---------------- | ----------------------------------------------------------------------------- | -------- | ------------------ | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | entry | Path to the entry file of the application. | Yes | N/A | './index.js' | Any valid file path to a .js/.ts script. | | out | Path for the output executable file. | Yes | N/A | './build/My Cool App.exe' | Any valid file path (ending with .exe). | | skipBundle | Skip the bundling process and use provided entry file as is. | No | false | true | Boolean | | version | Version of the application. | No | None | '2.4.2' | Semantic version string. e.g. major.minor.patch | | icon | Path to the application's icon in .ico format. | No | Node.js icon | './assets/icon.ico' | Any valid file path to a .ico icon. | | executionLevel | Execution level for the application. | No | 'asInvoker' | 'asInvoker' | asInvoker, highestAvailable, requireAdministrator | | properties | Metadata for the executable file. | No | None | { FileDescription: 'My Cool App', ... } | Key-value pairs as shown in example. |

Note on properties:

  • FileDescription: Description of the executable.
  • ProductName: Name of the product.
  • LegalCopyright: Copyright details with the URL.
  • OriginalFilename: Name of the original file.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © AngaBlue. This project is LGPL--3.0--or--later licensed.