pear-build 1.0.0 → 1.1.1

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.
Files changed (3) hide show
  1. package/README.md +12 -0
  2. package/index.js +6 -1
  3. package/package.json +22 -7
package/README.md CHANGED
@@ -6,6 +6,14 @@
6
6
  npm install -g pear-build
7
7
  ```
8
8
 
9
+ ## Supported Platforms
10
+
11
+ - Linux: `linux-arm64`, `linux-x64`
12
+ - macOS: `darwin-arm64`, `darwin-x64`
13
+ - Windows: `win32-arm64`, `win32-x64`
14
+ - iOS: `ios-arm64`, `ios-arm64-simulator`, `ios-x64-simulator`
15
+ - Android: `android-arm64`
16
+
9
17
  ## Usage
10
18
 
11
19
  Create a build dir outside the project root.
@@ -28,6 +36,7 @@ node bin.js \
28
36
  --linux-arm64-app ./test/fixtures/hello-pear-electron/out/HelloPear-linux-arm64/HelloPear.AppImage \
29
37
  --linux-x64-app ./test/fixtures/hello-pear-electron/out/HelloPear-linux-x64/HelloPear.AppImage \
30
38
  --win32-x64-app ./test/fixtures/hello-pear-electron/out/HelloPear-win32-x64/HelloPear.msix \
39
+ --win32-arm64-app ./test/fixtures/hello-pear-electron/out/HelloPear-win32-arm64/HelloPear.msix \
31
40
  --ios-arm64 ./test/fixtures/hello-pear-react-native/ota/ios/HelloPear \
32
41
  --ios-arm64-simulator ./test/fixtures/hello-pear-react-native/ota/ios/HelloPear \
33
42
  --ios-x64-simulator ./test/fixtures/hello-pear-react-native/ota/ios/HelloPear \
@@ -68,6 +77,9 @@ my-build
68
77
  │   ├── linux-x64
69
78
  │   │   └── app
70
79
  │   │   └── HelloPear.AppImage
80
+ │   ├── win32-arm64
81
+ │   │   └── app
82
+ │   │   └── HelloPear.msix
71
83
  │   └── win32-x64
72
84
  │   └── app
73
85
  │   └── HelloPear.msix
package/index.js CHANGED
@@ -13,7 +13,8 @@ class Build extends EventEmitter {
13
13
 
14
14
  async run(opts) {
15
15
  const pkgPath = path.resolve(opts.package)
16
- const pkg = require(pkgPath)
16
+ const pkgFile = await fs.promises.readFile(pkgPath, 'utf-8')
17
+ const pkg = JSON.parse(pkgFile)
17
18
  const { target = path.resolve(pkg.name + '-' + pkg.version) } = opts
18
19
  const darwinArm64App = opts.darwinArm64App
19
20
  ? ['darwin-arm64', path.resolve(opts.darwinArm64App)]
@@ -24,6 +25,9 @@ class Build extends EventEmitter {
24
25
  : null
25
26
  const linuxX64App = opts.linuxX64App ? ['linux-x64', path.resolve(opts.linuxX64App)] : null
26
27
  const win32X64App = opts.win32X64App ? ['win32-x64', path.resolve(opts.win32X64App)] : null
28
+ const win32Arm64App = opts.win32Arm64App
29
+ ? ['win32-arm64', path.resolve(opts.win32Arm64App)]
30
+ : null
27
31
  const iosArm64 = opts.iosArm64 ? ['ios-arm64', path.resolve(opts.iosArm64)] : null
28
32
  const iosArm64Sim = opts.iosArm64Simulator
29
33
  ? ['ios-arm64-simulator', path.resolve(opts.iosArm64Simulator)]
@@ -50,6 +54,7 @@ class Build extends EventEmitter {
50
54
  linuxArm64App,
51
55
  linuxX64App,
52
56
  win32X64App,
57
+ win32Arm64App,
53
58
  iosArm64,
54
59
  iosArm64Sim,
55
60
  iosx64Sim,
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "pear-build",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "main": "index.js",
5
5
  "type": "commonjs",
6
- "bin": "bin.js",
6
+ "bin": {
7
+ "pear-build": "bin.js"
8
+ },
7
9
  "description": "Create project deployment folder",
8
10
  "author": "Holepunch Inc",
9
11
  "license": "Apache-2.0",
@@ -20,6 +22,7 @@
20
22
  "flag --linux-arm64-app [path]": "Path to Linux ARM64 app",
21
23
  "flag --linux-x64-app [path]": "Path to Linux x64 app",
22
24
  "flag --win32-x64-app [path]": "Path to Windows x64 app",
25
+ "flag --win32-arm64-app [path]": "Path to Windows ARM64 app",
23
26
  "flag --ios-arm64 [path]": "Path to iOS ARM64 folder (ota bundle and assets)",
24
27
  "flag --ios-arm64-simulator [path]": "Path to iOS ARM64-Simulator folder (ota bundle and asset)",
25
28
  "flag --ios-x64-simulator [path]": "Path to iOS x64-Simulator folder (ota bundle and assets)",
@@ -43,9 +46,10 @@
43
46
  "scripts": {
44
47
  "format": "prettier --write .",
45
48
  "lint": "prettier --check . && lunte",
49
+ "make:test": "brittle-make-test test/all.mjs test/*.test.js",
46
50
  "test": "npm run test:node && npm run test:bare",
47
- "test:bare": "brittle-bare --coverage test/all.js",
48
- "test:node": "brittle-node --coverage test/all.js"
51
+ "test:bare": "brittle-bare --coverage test/all.mjs",
52
+ "test:node": "brittle-node --coverage test/all.mjs"
49
53
  },
50
54
  "dependencies": {
51
55
  "bare-events": "^2.8.2",
@@ -55,12 +59,23 @@
55
59
  "paparam": "^1.10.0"
56
60
  },
57
61
  "devDependencies": {
58
- "bare-fs": "^4.5.3",
59
- "brittle": "^3.19.1",
62
+ "brittle": "^4.0.0",
60
63
  "lunte": "^1.6.0",
61
64
  "mirror-drive": "^1.13.0",
62
65
  "prettier": "^3.7.4",
63
66
  "prettier-config-holepunch": "^2.0.0",
64
67
  "test-tmp": "^1.4.0"
65
- }
68
+ },
69
+ "directories": {
70
+ "test": "test"
71
+ },
72
+ "repository": {
73
+ "type": "git",
74
+ "url": "git+https://github.com/holepunchto/pear-build.git"
75
+ },
76
+ "keywords": [],
77
+ "bugs": {
78
+ "url": "https://github.com/holepunchto/pear-build/issues"
79
+ },
80
+ "homepage": "https://github.com/holepunchto/pear-build#readme"
66
81
  }