-
-
Notifications
You must be signed in to change notification settings - Fork 812
/
Copy pathcreateDMG.js
38 lines (36 loc) · 910 Bytes
/
createDMG.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const path = require('path')
const createDMG = require('electron-installer-dmg')
const pkg = require('../../package.json')
const appPath = path.join(__dirname, '../../release/React Native Debugger.app')
createDMG(
{
appPath,
name: 'React Native Debugger',
title: 'React Native Debugger',
// https://github.com/sindresorhus/create-dmg/tree/master/assets
background: path.join(__dirname, 'dmg-background.png'),
icon: path.join(__dirname, '../../electron/logo.icns'),
overwrite: true,
contents: [
{
x: 180,
y: 170,
type: 'file',
path: appPath,
},
{
x: 480,
y: 170,
type: 'link',
path: '/Applications',
},
],
dmgPath: path.join(
__dirname,
`../../release/react-native-debugger_${pkg.version}_universal.dmg`,
),
},
(err) => {
if (err) console.log(err)
},
)