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

gulp-electron-downloader

v1.0.0

Published

A gulp.js plugin to help download electron.

Downloads

5

Readme

gulp-electron-downloader

A gulp.js plugin to download electron. Super simple, it will simply download (and cache) and extract to a directory of your choice. You can run with zero-configuration, and use the defaults. Or configure as you wish.

This plugin makes it really easy to get any electron binary you need, where as most others only download electron for the platform for the host.

If you're wanting to build an electron release, you'll need another plugin for that.

Installation

Install gulp plugin package:

npm install --save-dev gulp-electron-downloader

Usage

The most simple is the following:

var gulp = require('gulp');
var electronDownloader = require('gulp-electron-downloader');

gulp.task('download-electron', function(cb){

    electronDownloader(cb);

});

gulp.task('default', ['download-electron']);

This will download the latest release of electron, matching the platform and architecture of the host. The ./electron/cache folder will be used to store downloads, and the final output will end up ./electron/binaries.

The plugin makes unauthenticated requests to GitHub API. If you get rate-limit errors, use your own token by setting the env var GITHUB_OAUTH_TOKEN.

Constructor

electronDownloader([options], callback)

Options

You can customise what is downloaded with the following:

  • version - the version of electron you want to download. This defaults to the latest release.
  • platform - the platform you want to download. Choices are darwin, mas, win32, linux. This defaults to the host platform.
  • arch - the architecture of the platform you want to download. This defaults to the host architecture.
  • cacheDir - the location of the caching directory in which downloads will be stored. This defaults to ./electron/cache.
  • outputDir - the location of the unzipped binary. This defaults to ./electron/binaries/platform-arch/.
  • downloadMirror - a function that provided the official electron download URL for a particular version, returns a URL to a mirror of your choice. An example for China:
downloadMirror: function (downloadUrl) {
    return downloadUrl.replace('https://github.com/atom/electron/releases/download/v', 'https://npm.taobao.org/mirrors/electron/');
}