pear-build 1.3.1 → 1.3.2

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 (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +7 -2
package/index.js CHANGED
@@ -13,8 +13,7 @@ class Build extends EventEmitter {
13
13
  }
14
14
 
15
15
  async run(opts) {
16
- if (!opts.package) throw ERR_INVALID_INPUT('package.json path must be specified.')
17
- const pkgPath = path.resolve(opts.package)
16
+ const pkgPath = path.resolve(opts.package || './package.json')
18
17
  const pkg = await getParsedJSON('package.json', pkgPath)
19
18
 
20
19
  const isMobile = !!pkg.dependencies?.['react-native-bare-kit'] // in mobile react-native-bare-kit needs to be listed in project's deps
@@ -44,6 +43,7 @@ class Build extends EventEmitter {
44
43
  if (each) apps.push([arch, path.resolve(each)])
45
44
  }
46
45
  }
46
+ if (apps.length === 0) throw ERR_INVALID_INPUT('at least one app build must be specified')
47
47
 
48
48
  const byArch = path.join(target, 'by-arch')
49
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pear-build",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "main": "index.js",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -15,7 +15,12 @@
15
15
  ],
16
16
  "command": {
17
17
  "summary": "Create project deployment folder",
18
- "flag --package [path]": "Path to project package.json",
18
+ "flag --package [path]": [
19
+ "Path to project package.json",
20
+ {
21
+ "default": "./package.json"
22
+ }
23
+ ],
19
24
  "flag --target [path]": "Target build dir",
20
25
  "flag --config [path]": "Path to project pear.json (mandatory for mobile)",
21
26
  "flag --darwin-arm64-app [path]": [