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 🙏

© 2026 – Pkg Stats / Ryan Hefner

installer-infrastructure

v1.0.0

Published

Reusable installer generation for Electron apps — NSIS branding, assets, license page, user options

Readme

Installer Infrastructure

Reusable installer generation for Electron apps. Decouple NSIS branding, user options, and license activation from your app and share the same infrastructure across multiple projects.

What This Package Does

| Feature | Description | |---------|-------------| | Asset generation | Creates icon.ico, installerHeader.bmp, installerSidebar.bmp from a single Logo.png | | NSIS config | Professional multi-step wizard with user choices (install path, shortcuts, etc.) | | License page | Optional license paste step during install (for use with license-key systems) | | EULA template | Configurable license.txt for the installer | | CLI | npx install-generate-assets for asset-only generation |

Installation

npm install installer-infrastructure

Or from a local path (monorepo / development):

npm install file:../PathofInstalling

Requirements: Node.js 18+, electron-builder (optional peer, for NSIS builds)


Quick Start

Option A: Full preparation (recommended)

Generate all assets, installer.nsh, and license.txt in one call:

const path = require('path');
const { prepareInstaller } = require('installer-infrastructure');

prepareInstaller({
  appName: 'Path of Rolling',
  appDataFolder: 'Path of Rolling',
  logoPath: path.join(__dirname, 'Logo.png'),
  outputDir: path.join(__dirname, 'build'),
  licenseFilename: 'license.json',
}).then(() => console.log('Installer prepared.'));

Option B: Programmatic API

Use individual functions for fine-grained control:

const installer = require('installer-infrastructure');

// Generate assets only
await installer.generateInstallerAssets({
  logoPath: './Logo.png',
  outputDir: './build',
});

// Get electron-builder NSIS config (merge into your build config)
const nsisConfig = installer.getNsisConfig({
  appName: 'My App',
  buildDir: 'build',
});

// Get custom NSIS page content (license paste)
const nshContent = installer.getInstallerNshContent({
  appName: 'My App',
  appDataFolder: 'My App',
  licenseFilename: 'license.json',
});

// Get EULA content
const licenseContent = installer.getLicenseTxtContent({ appName: 'My App' });

Option C: CLI (assets only)

npx install-generate-assets
# Or with options:
npx install-generate-assets --logo ./Logo.png --output ./build

Integration with electron-builder

  1. Call prepareInstaller() (or generateInstallerAssets() + manual nsh/license) before running electron-builder.
  2. Merge getNsisConfig() into your package.json build section:
{
  "build": {
    "win": {
      "target": "nsis",
      "icon": "build/icon.ico"
    },
    "nsis": {
      "oneClick": false,
      "allowToChangeInstallationDirectory": true,
      "allowElevation": true,
      "perMachine": false,
      "createDesktopShortcut": true,
      "createStartMenuShortcut": true,
      "menuCategory": "My App",
      "license": "build/license.txt",
      "installerHeader": "build/installerHeader.bmp",
      "installerSidebar": "build/installerSidebar.bmp",
      "include": "build/installer.nsh",
      "uninstallDisplayName": "My App"
    }
  }
}

Or use getNsisConfig({ appName: 'My App' }) and merge programmatically.


License activation integration

The optional license paste page writes to %APPDATA%\YourApp\license.json. Use matching appDataFolder and licenseFilename in both this package and your license validation logic (e.g. license-key-infrastructure).


API Reference

See API.md for full function signatures, options, and TypeScript types.


Using in multiple projects

  1. Add installer-infrastructure as a dependency.
  2. Call prepareInstaller() before electron-builder with your app name and paths.
  3. Ensure Logo.png exists at your project root (or pass logoPath).
  4. Share the same branding approach across all your Electron apps.

Publishing to npm

If you maintain this package and want to publish it:

  1. Ensure the package name is available (or use a scoped name like @yourorg/installer-infrastructure).
  2. Update package.json with your author and repository URLs.
  3. Run:
npm login
npm publish

For a scoped package (e.g. @wisernage/installer-infrastructure):

npm publish --access public