gulp-electron for gulp 
A gulp plugin that creates electron based distributable applications.
Install with npm.
npm install --save-dev gulp-electronAdd 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.37.4',
packaging: true,
token: 'abc123...',
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.
If you using windows: install 7z(http://www.7-zip.org/).
-
srcThe root directory of the sources that shall be packaged, required. -
packageJsonThe package.json, required. -
cacheThe download path for the electron package, required. -
releaseis where the release applictions path, required. -
versionthe version of the electron release to be download from the GitHub page, required. -
platformsSupport['darwin','win32','linux','darwin-x64','linux-ia32','linux-x64','win32-ia32','win64-64'], default isdarwin-x64. If verion is underv0.13.0must use['darwin','win32','linux']. -
apmPath to theatom-package-managerexecutable. If not specified the default behavior will be to use the globally installedapmexecutable. -
rebuildDefault isfalse, when set totruethen rebuild native-modules. -
asarDefault isfalse, when set totruethen asar pack your app directory. see more docs(https://github.com/atom/electron/blob/master/docs/tutorial/application-packaging.md). -
asarUnpackDefault isfalse, this options use minimatch to filter out asar file. -
asarUnpackDirDefault isfalse, this options filter out asar directory, ex:vendorfilter outvendordir. -
symbolsDefault isfalse, when set totruethe symbols package from GitHub will be downloaded. -
packagingDefault isfalse, when set totruethe packaging zip file. -
tokenDefault isundefinedor envGITHUB_TOKEN, when set to a GitHub authentication token helps prevent rate-limits when downloading Electron releases. -
platformResourcesdarwinMac resources. See Core Foundation Keys for details.CFBundleDisplayNameThe actual name of the bundleCFBundleIdentifierAn 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 (“-”).CFBundleNameThe short display name of the bundle.CFBundleVersionThe build-version-number string for the bundle.CFBundleURLTypesAn array of dictionaries describing the URL schemes supported by the bundle.iconPath to the icon file..icnsformat
winWindows 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.exeversion string.file-versionFile's version to change to.product-versionProduct's version to change to.iconPath to the icon file..icoformat
MIT
