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-simple-publisher

v2.0.1

Published

Simple way to publish releases for electron-simple-updater

Downloads

187

Readme

logo

electron-simple-publisher

Build Status npm version

Description

This module makes easy to publish updates created by electron-builder. Now SSH, github, ftp, Amazon S3 and local release transports are supported. You can enable update feature in your application using electron-simple-updater

Installation

Install with npm:

npm install --save-dev electron-simple-publisher

Usage

  1. For windows build set the target value to squirrel in package.json:
...
"build": {
  ...
  "win": {
    "target": "squirrel"
  }
},
...
  1. Make a distributive package using electron-builder

  2. Set options: You can specify all option through command line arguments, but it's easier to store the config in publisher.js or publisher.json in the project root. Here is an example for publishing through SSH:

{
  "transport": {
    "module": "ssh",
    "host": "example.com",
    "username": "user",
    "password": "user's password",
    "remotePath": "/www/example.com/updates",
    "remoteUrl": "http://example.com/updates",
  },
  "fields": { // Additional fields which will be added to updates.json
    "readme": "The first version"
  },
  // If you've already set package.json:updater.url you can skip this option:
  "metaFileUrl": "http://example.com/updates/update.json",
  // Builds contained these substrings will be ignored when run clean command
  "except": [
    "prod-v0.5.0"
  ]
}
  1. Run a publish command:

$ node_modules/.bin/publish - will publish the latest build for the current platform

Command line arguments

Usage: publish [command] [options] [arguments]

Commands (default is publish):
  publish [configFile] [buildId1 Id2 …|all] Publish a new build(s).
  replace [configFile] [buildId]            Replace the current build.
  remove  [configFile] [buildId1 Id2 …]     Remove one or more builds.
  clean   [configFile]                      Remove builds missed in updates.json
    -e, --except NAME1,NAME2                NAME1,NAME2 will be preserved
  list    [configFile]                      Show builds on a hosting.

BuildId has a following format: [platform]-[arch]-[channel]-[version]
  You can specify only a part of buildId, like linux-x64, defaults:
    platform: process.platform
    arch:     process.arch
    channel:  package.json:updater.channel or prod
    version:  package.json:version

Options:
  configFile             File with json ext, defaults to ./publisher.js
  -t, --transport        Selected transport
      --transport.{name} Specify a transport option
  -p, --path             Path to distributive files (default dist).
  -d, --debug            Show debug information
  -n, --noprogress       Don't show upload progress
      --fields.{name}    Specify a field in the target updates.json file 
      --help             Show this message
      --version          Show publisher version

Transports

SSH

Upload releases using SSH protocol. This transport uses ssh2 internally so you can check its documentation for all transport options.

Github

Upload updates to github releases. You can use this transport even if you don't want to share your source code. For this purposes you just need to create a public repository which will store your releases.

FTP

Upload releases using FTP protocol. This transport uses node-ftp internally so you can check its documentation for all transport options.

Amazon S3

Upload releases to S3 storage.

Azure Blob storage

Local

This transport allows to create file structure which can be uploaded to a server manually.

Related

License

Licensed under MIT.