🔖 2.2.5

This commit is contained in:
Tw93
2023-07-22 01:15:54 +08:00
parent 764e28849d
commit 21ff3f3a65
3 changed files with 19 additions and 4 deletions

9
bin/options/icon.ts vendored
View File

@@ -45,7 +45,14 @@ export async function downloadIcon(iconUrl: string) {
}
const { path: tempPath } = await dir();
const iconPath = `${tempPath}/icon.${fileDetails.ext}`;
let iconPath = `${tempPath}/icon.${fileDetails.ext}`;
// Fix this for linux
if (IS_LINUX) {
iconPath = 'png/linux_temp.png';
await fsExtra.outputFile(`${npmDirectory}/src-tauri/${iconPath}`, iconData);
} else {
await fsExtra.outputFile(iconPath, iconData);
}
await fsExtra.outputFile(iconPath, iconData);
spinner.succeed(chalk.green('Icon downloaded successfully!'));
return iconPath;

12
dist/cli.js vendored
View File

@@ -20,7 +20,7 @@ import isUrl from 'is-url';
import fs from 'fs';
var name = "pake-cli";
var version = "2.2.4";
var version = "2.2.5";
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。";
var engines = {
node: ">=16.0.0"
@@ -822,7 +822,15 @@ async function downloadIcon(iconUrl) {
return null;
}
const { path: tempPath } = await dir();
const iconPath = `${tempPath}/icon.${fileDetails.ext}`;
let iconPath = `${tempPath}/icon.${fileDetails.ext}`;
// Fix this for linux
if (IS_LINUX) {
iconPath = 'png/linux_temp.png';
await fsExtra.outputFile(`${npmDirectory}/src-tauri/${iconPath}`, iconData);
}
else {
await fsExtra.outputFile(iconPath, iconData);
}
await fsExtra.outputFile(iconPath, iconData);
spinner.succeed(chalk.green('Icon downloaded successfully!'));
return iconPath;

View File

@@ -1,6 +1,6 @@
{
"name": "pake-cli",
"version": "2.2.4",
"version": "2.2.5",
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。",
"engines": {
"node": ">=16.0.0"