🎨 Restructuring
This commit is contained in:
38
bin/README.md
vendored
38
bin/README.md
vendored
@@ -64,7 +64,6 @@ url 为你需要打包的网页链接 🔗,必须提供。
|
||||
-n <value>
|
||||
```
|
||||
|
||||
|
||||
#### [icon]
|
||||
|
||||
应用 icon,支持本地/远程文件,默认为 Pake 自带图标,定制的可以去 [icon-icons](https://icon-icons.com) 或 [macOSicons](https://macosicons.com/#/) 搜索下载。
|
||||
@@ -85,6 +84,8 @@ url 为你需要打包的网页链接 🔗,必须提供。
|
||||
|
||||
```shell
|
||||
--height <number>
|
||||
# 或者
|
||||
-h <number>
|
||||
```
|
||||
|
||||
#### [width]
|
||||
@@ -107,14 +108,6 @@ url 为你需要打包的网页链接 🔗,必须提供。
|
||||
-t
|
||||
```
|
||||
|
||||
#### [resize]
|
||||
|
||||
是否可以拖动大小,默认为 `true` 可拖动。使用下面的命令来关闭该功能。
|
||||
|
||||
```shell
|
||||
--no-resizable
|
||||
```
|
||||
|
||||
#### [fullscreen]
|
||||
|
||||
打开应用后是否开启全屏,默认为 `false`,使用下面的命令开启该功能。
|
||||
@@ -125,22 +118,39 @@ url 为你需要打包的网页链接 🔗,必须提供。
|
||||
-f
|
||||
```
|
||||
|
||||
#### [resize]
|
||||
|
||||
是否可以拖动大小,默认为 `true` 可拖动。使用下面的命令来关闭该功能。
|
||||
|
||||
```shell
|
||||
--no-resizable
|
||||
# 或者
|
||||
-r
|
||||
```
|
||||
|
||||
#### [multi-arch]
|
||||
打包结果同时支持英特尔和m1芯片,仅适用于MacOS,默认为 `false`。
|
||||
|
||||
打包结果同时支持英特尔和 m1 芯片,仅适用于 MacOS,默认为 `false`。
|
||||
|
||||
##### 准备工作
|
||||
- 注意:开启该选项后,需要用rust官网的rustup安装rust,不支持brew安装。
|
||||
- 对于intel芯片用户,需要安装arm64跨平台包,使安装包支持m1芯片,使用下面命令安装。
|
||||
|
||||
- 注意:开启该选项后,需要用 rust 官网的 rustup 安装 rust,不支持 brew 安装。
|
||||
- 对于 intel 芯片用户,需要安装 arm64 跨平台包,使安装包支持 m1 芯片,使用下面命令安装。
|
||||
|
||||
```shell
|
||||
rustup target add aarch64-apple-darwin
|
||||
```
|
||||
- 对于M1芯片用户,需要安装x86跨平台包,使安装包支持interl芯片,使用下面的命令安装。
|
||||
|
||||
- 对于 M1 芯片用户,需要安装 x86 跨平台包,使安装包支持 interl 芯片,使用下面的命令安装。
|
||||
|
||||
```shell
|
||||
rustup target add x86_64-apple-darwin
|
||||
```
|
||||
|
||||
##### 使用方法
|
||||
|
||||
```shell
|
||||
--multi-arch
|
||||
# 或者
|
||||
-m
|
||||
```
|
||||
```
|
||||
|
||||
29
bin/README_EN.md
vendored
29
bin/README_EN.md
vendored
@@ -84,6 +84,8 @@ The height of the packaged application window. The default is `780px`.
|
||||
|
||||
```shell
|
||||
--height <number>
|
||||
# or
|
||||
-h <number>
|
||||
```
|
||||
|
||||
#### [width]
|
||||
@@ -106,15 +108,6 @@ Whether to enable the immersive header. The default is `false`. Use the command
|
||||
-t
|
||||
```
|
||||
|
||||
#### [resize]
|
||||
|
||||
Indicates if the window can be resized. The default value is `true`.
|
||||
Use the command below to disable this feature.
|
||||
|
||||
```shell
|
||||
--no-resizable
|
||||
```
|
||||
|
||||
#### [fullscreen]
|
||||
|
||||
Indicates if the window should be full screen on application launch. The default is `false`.
|
||||
@@ -126,20 +119,38 @@ Use the command below to enable this feature.
|
||||
-f
|
||||
```
|
||||
|
||||
#### [resize]
|
||||
|
||||
Indicates if the window can be resized. The default value is `true`.
|
||||
Use the command below to disable this feature.
|
||||
|
||||
```shell
|
||||
--no-resizable
|
||||
#or
|
||||
-r
|
||||
```
|
||||
|
||||
#### [multi-arch]
|
||||
|
||||
Package results support both Intel and m1 chips, only for MacOS. The default is `false`.
|
||||
|
||||
##### Preparation
|
||||
|
||||
- Note: After enabling this option, you need to use rustup on the rust official website to install rust, brew installation is not supported.
|
||||
- For intel chip users, you need to install the arm64 cross-platform package to make the installation package support the m1 chip, and use the following command to install.
|
||||
|
||||
```shell
|
||||
rustup target add aarch64-apple-darwin
|
||||
```
|
||||
|
||||
- For M1 chip users, you need to install the x86 cross-platform package to make the installation package support the interl chip, and use the following command to install.
|
||||
|
||||
```shell
|
||||
rustup target add x86_64-apple-darwin
|
||||
```
|
||||
|
||||
##### Instructions
|
||||
|
||||
```shell
|
||||
--multi-arch
|
||||
# or
|
||||
|
||||
4
bin/cli.ts
vendored
4
bin/cli.ts
vendored
@@ -16,11 +16,11 @@ program
|
||||
.argument('[url]', 'the web url you want to package', validateUrlInput)
|
||||
.option('-n, --name <string>', 'application name')
|
||||
.option('-i, --icon <string>', 'application icon', DEFAULT_PAKE_OPTIONS.icon)
|
||||
.option('--height <number>', 'window height', validateNumberInput, DEFAULT_PAKE_OPTIONS.height)
|
||||
.option('-w, --width <number>', 'window width', validateNumberInput, DEFAULT_PAKE_OPTIONS.width)
|
||||
.option('--no-resizable', 'whether the window can be resizable', DEFAULT_PAKE_OPTIONS.resizable)
|
||||
.option('-h, --height <number>', 'window height', validateNumberInput, DEFAULT_PAKE_OPTIONS.height)
|
||||
.option('-f, --fullscreen', 'makes the packaged app start in full screen', DEFAULT_PAKE_OPTIONS.fullscreen)
|
||||
.option('-t, --transparent', 'transparent title bar', DEFAULT_PAKE_OPTIONS.transparent)
|
||||
.option('-r, --no-resizable', 'whether the window can be resizable', DEFAULT_PAKE_OPTIONS.resizable)
|
||||
.option('-d, --debug', 'debug', DEFAULT_PAKE_OPTIONS.debug)
|
||||
.option('-m, --multi-arch', "Supports both Intel and m1 chips, only for Mac.", DEFAULT_PAKE_OPTIONS.multiArch)
|
||||
.action(async (url: string, options: PakeCliOptions) => {
|
||||
|
||||
8
dist/cli.js
vendored
8
dist/cli.js
vendored
@@ -2170,8 +2170,8 @@ class BuilderFactory {
|
||||
}
|
||||
|
||||
var name = "pake-cli";
|
||||
var version = "1.2.2";
|
||||
var description = "🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App 🤱🏻 A simple way to make any web page a desktop application using Rust.";
|
||||
var version = "1.2.3";
|
||||
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。";
|
||||
var engines = {
|
||||
node: ">=16.0.0"
|
||||
};
|
||||
@@ -2279,11 +2279,11 @@ program
|
||||
.argument('[url]', 'the web url you want to package', validateUrlInput)
|
||||
.option('-n, --name <string>', 'application name')
|
||||
.option('-i, --icon <string>', 'application icon', DEFAULT_PAKE_OPTIONS.icon)
|
||||
.option('--height <number>', 'window height', validateNumberInput, DEFAULT_PAKE_OPTIONS.height)
|
||||
.option('-w, --width <number>', 'window width', validateNumberInput, DEFAULT_PAKE_OPTIONS.width)
|
||||
.option('--no-resizable', 'whether the window can be resizable', DEFAULT_PAKE_OPTIONS.resizable)
|
||||
.option('-h, --height <number>', 'window height', validateNumberInput, DEFAULT_PAKE_OPTIONS.height)
|
||||
.option('-f, --fullscreen', 'makes the packaged app start in full screen', DEFAULT_PAKE_OPTIONS.fullscreen)
|
||||
.option('-t, --transparent', 'transparent title bar', DEFAULT_PAKE_OPTIONS.transparent)
|
||||
.option('-r, --no-resizable', 'whether the window can be resizable', DEFAULT_PAKE_OPTIONS.resizable)
|
||||
.option('-d, --debug', 'debug', DEFAULT_PAKE_OPTIONS.debug)
|
||||
.option('-m, --multi-arch', "Supports both Intel and m1 chips, only for Mac.", DEFAULT_PAKE_OPTIONS.multiArch)
|
||||
.action((url, options) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "pake-cli",
|
||||
"version": "1.2.2",
|
||||
"description": "🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App 🤱🏻 A simple way to make any web page a desktop application using Rust.",
|
||||
"version": "1.2.3",
|
||||
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。",
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user