mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
25 lines
848 B
JavaScript
25 lines
848 B
JavaScript
const path = require('path');
|
|
const createDMG = require('electron-installer-dmg')
|
|
|
|
module.exports = (grunt) => {
|
|
grunt.registerTask('create-mac-dmg', 'Create DMG for Merani', function pack() {
|
|
const done = this.async();
|
|
const dmgPath = path.join(grunt.config('outputDir'), "Merani.dmg");
|
|
createDMG({
|
|
appPath: path.join(grunt.config('outputDir'), "Merani-darwin-x64", "Merani.app"),
|
|
name: "Merani",
|
|
background: path.resolve(grunt.config('appDir'), 'build', 'resources', 'mac', 'DMG-background.png'),
|
|
icon: path.resolve(grunt.config('appDir'), 'build', 'resources', 'mac', 'merani.icns'),
|
|
overwrite: true,
|
|
out: grunt.config('outputDir'),
|
|
}, (err) => {
|
|
if (err) {
|
|
done(err);
|
|
return
|
|
}
|
|
|
|
grunt.log.writeln(`>> Created ${dmgPath}`);
|
|
done(null);
|
|
})
|
|
});
|
|
};
|