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

@electron-delta/builder

v0.1.17

Published

True delta updates for electronjs.

Downloads

240

Readme

I'm working on macos delta updates. It's going to come soon. Help required!

@electron-delta/builder

True delta updates for electronjs apps. It reduces the bandwidth usage by 90%. Users download only the delta. It uses binary diffing (HDiffPatch library) to generate the delta.

Delta updates

Requirements

  1. The app must use electron-builder to build the app.
  2. Currently only Windows os is supported. MacOS support is arriving soon.
  3. Target must be nsis or nsis-web

Installation

Step 1:

npm install @electron-delta/builder -D

Step 2:

Create a file name called .electron-delta.js in the root of the project.

Step 3:

In the electron-builder config, mention the above file as afterAllArtifactBuild hook.

"build": {
    "appId": "com.electron.sample-app",
    "afterAllArtifactBuild": ".electron-delta.js",
    "win": {
      "target": ["nsis"],
      "publish": ["github"]
    },
    "nsis": {
      "oneClick": true,
      "perMachine": false,
    }
}

Step 4:

Paste the following code in the .electron-delta.js file. It will be executed after the app is built.

// .electron-delta.js
const DeltaBuilder = require("@electron-delta/builder");
const path = require("path");

const options = {
  productIconPath: path.join(__dirname, "icon.ico"),
  productName: "electron-sample-app",

  getPreviousReleases: async () => {
    return [
      {
        version: '0.0.12',
        url: 'https://github.com/electron-delta/electron-sample-app/releases/download/v0.0.12/electron-sample-app-0.0.12.exe'
      },
      {
        version: '0.0.11',
        url: 'https://github.com/electron-delta/electron-sample-app/releases/download/v0.0.11/electron-sample-app-0.0.11.exe'
      },
      {
        version: '0.0.9',
        url: 'https://github.com/electron-delta/electron-sample-app/releases/download/v0.0.9/electron-sample-app-0.0.9.exe'
      }
    ];
  },
  sign: async (filePath) => {
    // sign each delta executable
  },
};

exports.default = async function (context) {
  const deltaInstallerFiles = await DeltaBuilder.build({
    context,
    options,
  });
  return deltaInstallerFiles;
};

options

  • productIconPath: (required) Path to the icon file. The icon file must be a .ico file.
  • productName: (required) Name of the product.
  • getPreviousReleases: (required) Function to get the previous releases. It must return an array of objects. Each object must have version and url properties.
  • sign: (required) Function to sign the delta executable.
  • cache: (optional) Path to the cache directory. If not specified, the default cache directory will be used. The default cache directory is ~/.electron-delta/.
  • processName: (optional) Name of the process. If different from the product name.
  • latestVersion: (optional) Latest version of the product. If not specified, the latest version will be fetched process.env.npm_package_version.