bare-build 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ npm i [-g] bare-build
|
|
|
12
12
|
const build = require('bare-build')
|
|
13
13
|
|
|
14
14
|
for await (const resource of build('/path/to/app.js', {
|
|
15
|
+
base: '/path/to/',
|
|
15
16
|
target: ['darwin-arm64', 'darwin-x64'],
|
|
16
17
|
icon: 'icon.icns',
|
|
17
18
|
identifier: 'com.example.App'
|
|
@@ -42,6 +43,7 @@ options = {
|
|
|
42
43
|
description: pkg.description,
|
|
43
44
|
icon,
|
|
44
45
|
identifier,
|
|
46
|
+
base: '.',
|
|
45
47
|
target: [],
|
|
46
48
|
out: '.',
|
|
47
49
|
runtime,
|
|
@@ -85,6 +87,7 @@ Flags include:
|
|
|
85
87
|
--description <text> The description of the application
|
|
86
88
|
--icon|-i <path> The application icon
|
|
87
89
|
--identifier <id> The unique application identifier
|
|
90
|
+
--base <path> The base path of the application (default: .)
|
|
88
91
|
--target|-t <host> The host to target
|
|
89
92
|
--out|-o <dir> The output directory
|
|
90
93
|
--runtime <specifier> The runtime to use
|
package/bin.js
CHANGED
|
@@ -15,6 +15,7 @@ const cmd = command(
|
|
|
15
15
|
flag('--description <text>', 'The description of the application'),
|
|
16
16
|
flag('--icon|-i <path>', 'The application icon'),
|
|
17
17
|
flag('--identifier <id>', 'The unique application identifier'),
|
|
18
|
+
flag('--base <path>', 'The base path of the application').default('.'),
|
|
18
19
|
flag('--target|-t <host>', 'The host to target').multiple(),
|
|
19
20
|
flag('--out|-o <dir>', 'The output directory'),
|
|
20
21
|
flag('--runtime <specifier>', 'The runtime to use'),
|
|
@@ -43,6 +44,7 @@ const cmd = command(
|
|
|
43
44
|
description,
|
|
44
45
|
icon,
|
|
45
46
|
identifier,
|
|
47
|
+
base,
|
|
46
48
|
target,
|
|
47
49
|
out,
|
|
48
50
|
runtime,
|
|
@@ -73,6 +75,7 @@ const cmd = command(
|
|
|
73
75
|
description,
|
|
74
76
|
icon,
|
|
75
77
|
identifier,
|
|
78
|
+
base,
|
|
76
79
|
target,
|
|
77
80
|
out,
|
|
78
81
|
runtime,
|
|
@@ -41,6 +41,8 @@ module.exports = async function* createAppDir(base, bundle, preflight, host, out
|
|
|
41
41
|
path.join(app, name + path.extname(icon))
|
|
42
42
|
)
|
|
43
43
|
|
|
44
|
+
await fs.symlink(name + path.extname(icon), path.join(icons, name))
|
|
45
|
+
|
|
44
46
|
await fs.symlink(name + path.extname(icon), path.join(app, '.DirIcon'))
|
|
45
47
|
|
|
46
48
|
yield* link(base, { ...opts, hosts: [host], out: usr })
|
|
@@ -93,8 +95,8 @@ function createDesktopEntry(name) {
|
|
|
93
95
|
[Desktop Entry]
|
|
94
96
|
Version=1.0
|
|
95
97
|
Name=${name}
|
|
96
|
-
Icon
|
|
97
|
-
Exec
|
|
98
|
+
Icon=/usr/share/icons/${name}
|
|
99
|
+
Exec=/usr/bin/${toIdentifier(name)}
|
|
98
100
|
Type=Application
|
|
99
101
|
Categories=
|
|
100
102
|
`
|
|
@@ -2,7 +2,7 @@ const path = require('path')
|
|
|
2
2
|
|
|
3
3
|
// https://docs.appimage.org/packaging-guide/manual.html#creating-an-appimage-from-the-appdir
|
|
4
4
|
module.exports = async function* createAppImage(appDir, out, opts = {}) {
|
|
5
|
-
const createAppImage = require('bare-app-image') // Optional
|
|
5
|
+
const { createAppImage } = require('bare-app-image') // Optional
|
|
6
6
|
|
|
7
7
|
const { name, sign = false, key } = opts
|
|
8
8
|
|