pake-cli 0.0.1-beta.8 → 0.0.1-beta.9

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,7 +55,7 @@ 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(`${path.join(appRootPath.path, '/node_modules/.bin/tauri')} build --config ${configJsonPath} --target universal-apple-darwin`);
58
+ const code = await shellExec(`npx tauri 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
  }
@@ -1,28 +1,5 @@
1
1
  import path from 'path';
2
- import { checkRustInstalled, installRust } from '@/helpers/rust.js';
3
2
  import appRootPath from 'app-root-path';
4
- import prompts from 'prompts';
5
-
6
- export async function prepareCheck() {
7
- if (checkRustInstalled()) {
8
- console.log('Rust has been installed');
9
- return;
10
- }
11
-
12
- console.warn('Rust is not installed, show prompt');
13
- const res = await prompts({
14
- type: 'confirm',
15
- message: 'Detect you have not installed Rust, install it now?',
16
- name: 'value',
17
- });
18
-
19
- if (res.value) {
20
- await installRust();
21
- } else {
22
- console.error('Error: Pake need Rust to package your webapp!!!');
23
- process.exit(2);
24
- }
25
- }
26
3
 
27
4
  export function getBuildedAppPath(name: string, version: string) {
28
5
  return path.join(appRootPath.path, 'src-tauri/target/universal-apple-darwin/release/bundle/dmg', `${name}_${version}_universal.dmg`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pake-cli",
3
- "version": "0.0.1-beta.8",
3
+ "version": "0.0.1-beta.9",
4
4
  "description": "用 Rust 来打包你的 App,底层使用 Tauri,当前支持微信读书、Flomo、Vercel",
5
5
  "bin": {
6
6
  "pake": "./cli.js"