Skip to content

Commit 19abd27

Browse files
committed
Merge pull request #106 from LinusU/optional-icon-size
Make icon-size optional
2 parents df77c2c + 17bb31f commit 19abd27

File tree

6 files changed

+2
-8
lines changed

6 files changed

+2
-8
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ the JSON file's path.
3939
"title": "Test Application",
4040
"icon": "test-app.icns",
4141
"background": "test-background.png",
42-
"icon-size": 80,
4342
"contents": [
4443
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
4544
{ "x": 192, "y": 344, "type": "file", "path": "TestApp.app" }
@@ -53,7 +52,7 @@ the JSON file's path.
5352
+ `icon` (string, optional) - Path to your icon, which will be shown when mounted
5453
+ `background` (string, optional) - Path to your background
5554
+ `background-color` (string, optional) - Background color (accepts css colors)
56-
+ `icon-size` (string, required) - Size of all the icons inside the DMG
55+
+ `icon-size` (string, optional) - Size of all the icons inside the DMG
5756
+ `window` (object, optional) - Window options
5857
+ `position` (object, optional) - Position when opened
5958
+ `x` (number, required) - X position relative to bottom of the screen

lib/appdmg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ module.exports = exports = function (options) {
354354
var ds = new DSStore()
355355

356356
ds.vSrn(1)
357-
ds.setIconSize(global.opts['icon-size'])
357+
ds.setIconSize(global.opts['icon-size'] || 80)
358358

359359
if (global.opts['background-color']) {
360360
var rgb = parseColor(global.opts['background-color']).rgb

schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
},
100100
"required": [
101101
"title",
102-
"icon-size",
103102
"contents"
104103
]
105104
}

test/api.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ describe('api', function () {
8989
title: 'Test Title',
9090
icon: 'TestIcon.icns',
9191
background: 'TestBkg.png',
92-
'icon-size': 80,
9392
contents: [
9493
{ x: 448, y: 344, type: 'link', path: '/Applications' },
9594
{ x: 192, y: 344, type: 'file', path: 'TestApp.app' },
@@ -118,7 +117,6 @@ describe('api', function () {
118117
icon: 'TestIcon.icns',
119118
background: 'TestBkg.png',
120119
format: 'UDRO',
121-
'icon-size': 80,
122120
contents: [
123121
{ x: 448, y: 344, type: 'link', path: '/Applications' },
124122
{ x: 192, y: 344, type: 'file', path: 'TestApp.app' },

test/assets/appdmg-bg-color.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"title": "Test Title",
33
"icon": "TestIcon.icns",
44
"background-color": "mintcream",
5-
"icon-size": 80,
65
"contents": [
76
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
87
{ "x": 192, "y": 344, "type": "file", "path": "TestApp.app" },

test/assets/appdmg.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"title": "Test Title",
33
"icon": "TestIcon.icns",
44
"background": "TestBkg.png",
5-
"icon-size": 80,
65
"contents": [
76
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
87
{ "x": 192, "y": 344, "type": "file", "path": "TestApp.app" },

0 commit comments

Comments
 (0)