pake-cli 0.0.1-beta.10 → 0.0.1-beta.12

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.
@@ -55,12 +55,12 @@ export default class MacBuilder implements IBuilder {
55
55
  const configJsonPath = `${dirPath}/config.json`;
56
56
  await fs.writeFile(configJsonPath, Buffer.from(JSON.stringify(tauriConf), 'utf-8'));
57
57
 
58
- const code = await shellExec(`npx tauri build --config ${configJsonPath} --target universal-apple-darwin`);
58
+ const code = await shellExec('../node_modules/@tauri-apps/cli/tauri.js build --config ${configJsonPath} --target universal-apple-darwin');
59
59
  const dmgName = `${name}_${'0.2.0'}_universal.dmg`;
60
60
  await fs.copyFile(this.getBuildedAppPath(dmgName), path.resolve(dmgName));
61
61
  }
62
62
 
63
63
  getBuildedAppPath(dmgName: string) {
64
- return path.join(appRootPath.path, 'src-tauri/target/universal-apple-darwin/release/bundle/dmg', dmgName);
64
+ return `../src-tauri/target/universal-apple-darwin/release/bundle/dmg/${dmgName}`
65
65
  }
66
66
  }
package/dist/cli.js CHANGED
@@ -14,7 +14,6 @@ import fs from 'fs/promises';
14
14
  import prompts from 'prompts';
15
15
  import ora from 'ora';
16
16
  import shelljs from 'shelljs';
17
- import appRootPath from 'app-root-path';
18
17
 
19
18
  /******************************************************************************
20
19
  Copyright (c) Microsoft Corporation.
@@ -360,13 +359,13 @@ class MacBuilder {
360
359
  const { path: dirPath } = yield dir();
361
360
  const configJsonPath = `${dirPath}/config.json`;
362
361
  yield fs.writeFile(configJsonPath, Buffer.from(JSON.stringify(tauriConf), 'utf-8'));
363
- yield shellExec(`npx tauri build --config ${configJsonPath} --target universal-apple-darwin`);
362
+ yield shellExec('../node_modules/@tauri-apps/cli/tauri.js build --config ${configJsonPath} --target universal-apple-darwin');
364
363
  const dmgName = `${name}_${'0.2.0'}_universal.dmg`;
365
364
  yield fs.copyFile(this.getBuildedAppPath(dmgName), path.resolve(dmgName));
366
365
  });
367
366
  }
368
367
  getBuildedAppPath(dmgName) {
369
- return path.join(appRootPath.path, 'src-tauri/target/universal-apple-darwin/release/bundle/dmg', dmgName);
368
+ return `../src-tauri/target/universal-apple-darwin/release/bundle/dmg/${dmgName}`;
370
369
  }
371
370
  }
372
371
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pake-cli",
3
- "version": "0.0.1-beta.10",
3
+ "version": "0.0.1-beta.12",
4
4
  "description": "用 Rust 来打包你的 App,底层使用 Tauri,当前支持微信读书、Flomo、Vercel",
5
5
  "bin": {
6
6
  "pake": "./cli.js"