Giter Site home page Giter Site logo

gulp-electron's Introduction

gulp-electron for gulp NPM version

Build Status AppVayor status Dependency Status Coverage Status Code Climate

A gulp plugin that creates electron based distributable applications.

Install

Install with npm.

npm install --save-dev gulp-electron

Usage

Add a gulp electron task like :

var gulp = require('gulp');
var electron = require('gulp-electron');
var packageJson = require('./src/package.json');

gulp.task('electron', function() {

    gulp.src("")
    .pipe(electron({
        src: './src',
        packageJson: packageJson,
        release: './release',
        cache: './cache',
        version: 'v0.26.1',
        packaging: true,
        platforms: ['win32-ia32', 'darwin-x64'],
        platformResources: {
            darwin: {
                CFBundleDisplayName: packageJson.name,
                CFBundleIdentifier: packageJson.name,
                CFBundleName: packageJson.name,
                CFBundleVersion: packageJson.version,
                icon: 'gulp-electron.icns'
            },
            win: {
                "version-string": packageJson.version,
                "file-version": packageJson.version,
                "product-version": packageJson.version,
                "icon": 'gulp-electron.ico'
            }
    }))
    .pipe(gulp.dest(""));
});

Executing gulp electron will create an electron package for the specified platforms.

When you run code under process.NODE_ENV = test more debug information will be displayed.

Dependency

If you using windows: install 7z(http://www.7-zip.org/).

options

  • src The root directory of the sources that shall be packaged, required.

  • packageJson The package.json, required.

  • cache The download path for the electron package, required.

  • release is where the release applictions path, required.

  • version the version of the electron release to be download from the GitHub page, required.

  • platforms Support ['darwin','win32','linux','darwin-x64','linux-ia32','linux-x64','win32-ia32','win64-64'], default is darwin-x64. If verion is under v0.13.0 must use ['darwin','win32','linux'].

  • apm Path to the atom-package-manager executable. If not specified the default behavior will be to use the globally installed apm executable.

  • rebuild Default is false, when set to true then rebuild native-modules.

  • asar Default is false, when set to true then asar pack your app directory. see more docs(https://github.com/atom/electron/blob/master/docs/tutorial/application-packaging.md).

  • symbols Default is false, when set to true the symbols package from GitHub will be downloaded.

  • packaging Default is false, when set to true the packaging zip file.

  • platformResources

    • darwin Mac resources. See Core Foundation Keys for details.
      • CFBundleDisplayName The actual name of the bundle
      • CFBundleIdentifier An identifier string that specifies the app type of the bundle. The string should be in reverse DNS format using only the Roman alphabet in upper and lower case (A–Z, a–z), the dot (“.”), and the hyphen (“-”).
      • CFBundleName The short display name of the bundle.
      • CFBundleVersion The build-version-number string for the bundle.
      • CFBundleURLTypes An array of dictionaries describing the URL schemes supported by the bundle.
      • icon Path to the icon file. .icns format
    • win Windows resources. On platforms other then Windows you will need to have Wine installed and in the system path.
      • version-string - An object containings properties to change of .exe version string.
      • file-version File's version to change to.
      • product-version Product's version to change to.
      • icon Path to the icon file. .ico format

License

MIT

gulp-electron's People

Contributors

mainyaa avatar xeodou avatar headcr4sh avatar sassy avatar stylet avatar sl2 avatar nazo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.