grunt-electron-packager-builder
v0.0.7
Published
Package Electron apps. Grunt task to electron-prebuilt , electron-packager and electron-builder.
Downloads
9
Maintainers
Readme
grunt-electron-packager-builder
Grunt tasks for working with electron, can run, compile and generate installers applications.
## I am working to improve this.
This task has many errors but works with electron 1.2. *.
The task 'installer' (electron-builder) does not work well.
Install
npm install grunt-electron-packager-builder --save-dev
Quick Setup for this task.
Gruntfile.js
module.exports = (grunt) => {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
eplus:{
run:{
options:{
appPath : './app' // default './app'
}
}
},
epack : {
default:{
options:{
icon : './app/recursos/icon', //Auto detect platform extension.
}
}
}
});
grunt.loadNpmTasks('grunt-electron-packager-builder');
grunt.registerTask('default', ['eplus:run']);
};
Options and Documentation
Dependencies needed to run the tasks
npm install electron-prebuilt --save-dev
npm install electron-packager --save-dev
npm install electron-builder --save-dev
npm install electron-rebuild --save-dev
See the electron-prebuilt.
See the electron-packager.
See the electron-builder.
See the electron-rebuild.
Gruntfile.js
module.exports = (grunt) => {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
eplus : {
run : {
options : {
appPath : './app' // default './app'
}
},
debug : {
options : {
appPath : './app', // default './app'
debug : true, // default false
port : 5858 // default 5858
}
}
},
ebuild : { // electron-packager
default:{
options: {
//overwrite : true, // default true
//platform : 'all', // default all
//arch : 'all', // default all
//version : '0.36.7', // default auto set
//name : 'Electron app', // default (options.dir+'/packeger.json').name
icon : './app/recursos/icon', //Auto detect platform extension.
dir : './app', // default ./app
out : './build' // default ./build
}
},
custom:{
options: (platform,arch) => {
return {
platform,
arch,
icon : './app/recursos/icon'// Auto detect platform extension
}
}
}
}// epack
grunt.loadNpmTasks('grunt-electron-packager-builder');
grunt.registerTask('default', ['eplus:run']);
};
License
MIT © Marani Matias Ezequiel