From 737022fa2b44347b667885362382875e8787e7c5 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Wed, 21 Dec 2022 19:42:17 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20pake=E6=9C=80=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/README.md | 4 +-- bin/README_EN.md | 4 +-- bin/defaults.ts | 4 +-- bin/types.ts | 4 +-- dist/cli.js | 72 +++++++++++++++++++++++++++++------------------- package.json | 4 +-- 6 files changed, 54 insertions(+), 38 deletions(-) diff --git a/bin/README.md b/bin/README.md index abe3304..b6b8bc4 100644 --- a/bin/README.md +++ b/bin/README.md @@ -51,7 +51,7 @@ url 为你需要打包的网页链接 🔗,必须提供。 #### [height] -打包后的应用窗口高度,默认 `800px`。 +打包后的应用窗口高度,默认 `780px`。 ```shell --height @@ -59,7 +59,7 @@ url 为你需要打包的网页链接 🔗,必须提供。 #### [width] -打包后的应用窗口宽度,默认 `1280px`。 +打包后的应用窗口宽度,默认 `1200px`。 ```shell --width diff --git a/bin/README_EN.md b/bin/README_EN.md index 76ac571..683e9d7 100644 --- a/bin/README_EN.md +++ b/bin/README_EN.md @@ -50,7 +50,7 @@ The application icon, support local and remote files, the default is brand icon #### [height] -The height of the packaged application window. The default is `800px`. +The height of the packaged application window. The default is `780px`. ```shell --height @@ -58,7 +58,7 @@ The height of the packaged application window. The default is `800px`. #### [width] -The width of the packaged application window. The default is `1280px`. +The width of the packaged application window. The default is `1200px`. ```shell --width diff --git a/bin/defaults.ts b/bin/defaults.ts index 5f808d2..fb5cbff 100644 --- a/bin/defaults.ts +++ b/bin/defaults.ts @@ -2,8 +2,8 @@ import { PakeCliOptions } from './types.js'; export const DEFAULT_PAKE_OPTIONS: PakeCliOptions = { icon: '', - height: 800, - width: 1280, + height: 780, + width: 1200, fullscreen: false, resizable: true, transparent: false, diff --git a/bin/types.ts b/bin/types.ts index 30ce729..9610edb 100644 --- a/bin/types.ts +++ b/bin/types.ts @@ -5,10 +5,10 @@ export interface PakeCliOptions { /** 应用icon */ icon: string; - /** 应用窗口宽度,默认 1280px */ + /** 应用窗口宽度,默认 1200px */ width: number; - /** 应用窗口高度,默认 800px */ + /** 应用窗口高度,默认 780px */ height: number; /** 是否可以拖动,默认true */ diff --git a/dist/cli.js b/dist/cli.js index 6d966c1..0415c56 100644 --- a/dist/cli.js +++ b/dist/cli.js @@ -15,35 +15,35 @@ import ora from 'ora'; import shelljs from 'shelljs'; import updateNotifier from 'update-notifier'; -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); } const DEFAULT_PAKE_OPTIONS = { icon: '', - height: 800, - width: 1280, + height: 780, + width: 1200, fullscreen: false, resizable: true, transparent: false, @@ -1961,7 +1961,9 @@ var tauri = { "libssl-dev", "libgtk-3-dev", "libayatana-appindicator3-dev", - "librsvg2-dev" + "librsvg2-dev", + "gnome-video-effects", + "gnome-video-effects-extra" ], files: { "/usr/share/applications/com-tw93-weread.desktop": "assets/com-tw93-weread.desktop" @@ -2167,8 +2169,11 @@ class BuilderFactory { } var name = "pake-cli"; -var version = "0.1.2"; +var version = "1.0.1"; var description = "🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App 🤱🏻 A simple way to make any web page a desktop application using Rust."; +var engines = { + node: "^14.13 || >=16.0.0" +}; var bin = { pake: "./cli.js" }; @@ -2180,6 +2185,14 @@ var author = { name: "Tw93", email: "tw93@qq.com" }; +var keywords = [ + "pake", + "pake-cli", + "rust", + "tauri", + "no-electron", + "productivity" +]; var files = [ "dist", "src-tauri", @@ -2190,6 +2203,7 @@ var scripts = { dev: "npm run tauri dev", "dev:debug": "npm run tauri dev -- --features devtools", build: "npm run tauri build --release", + "build:mac": "npm run tauri build -- --target universal-apple-darwin", "build:all-unix": "chmod +x ./script/build.sh && ./script/build.sh", "build:all-windows": ".\\script\\build.bat", tauri: "tauri", @@ -2202,7 +2216,7 @@ var exports = "./dist/pake.js"; var license = "MIT"; var dependencies = { "@tauri-apps/api": "^1.2.0", - "@tauri-apps/cli": "^1.2.1", + "@tauri-apps/cli": "^1.2.2", axios: "^1.1.3", chalk: "^5.1.2", commander: "^9.4.1", @@ -2238,9 +2252,11 @@ var packageJson = { name: name, version: version, description: description, + engines: engines, bin: bin, repository: repository, author: author, + keywords: keywords, files: files, scripts: scripts, type: type, diff --git a/package.json b/package.json index fb34ab8..0edaf8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pake-cli", - "version": "1.0.0", + "version": "1.0.1", "description": "🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App 🤱🏻 A simple way to make any web page a desktop application using Rust.", "engines": { "node": "^14.13 || >=16.0.0" @@ -40,7 +40,7 @@ "tauri": "tauri", "cli": "rollup -c rollup.config.js --watch", "cli:build": "cross-env NODE_ENV=production rollup -c rollup.config.js", - "cli:publish": "npm run cli:build && npm publish" + "prepublishOnly": "npm run cli:build" }, "type": "module", "exports": "./dist/pake.js",