🐛 更新一下文档结构
This commit is contained in:
91
README_EN.md
91
README_EN.md
@@ -148,86 +148,13 @@ npm run build
|
||||
|
||||
```
|
||||
|
||||
### Document Description
|
||||
## Custom Usage
|
||||
|
||||
- file tree
|
||||
|
||||
```bash
|
||||
.
|
||||
├── app.csv
|
||||
├── bin
|
||||
│ ├── builders
|
||||
│ ├── cli.ts
|
||||
│ ├── defaults.ts
|
||||
│ ├── helpers
|
||||
│ ├── options
|
||||
│ ├── README_EN.md
|
||||
│ ├── README.md
|
||||
│ ├── types.ts
|
||||
│ └── utils
|
||||
├── cli.js
|
||||
├── CODE_OF_CONDUCT.md
|
||||
├── CONTRIBUTING.md
|
||||
├── dist
|
||||
│ └── cli.js
|
||||
├── icns2png.py
|
||||
├── LICENSE
|
||||
├── package.json
|
||||
├── pake-default.icns
|
||||
├── README_EN.md
|
||||
├── README.md
|
||||
├── rollup.config.js
|
||||
├── script
|
||||
│ ├── build.bat
|
||||
│ ├── build.sh
|
||||
│ ├── sd-apple-x64
|
||||
│ ├── sd.exe
|
||||
│ └── sd-linux-x64
|
||||
├── src-tauri
|
||||
│ ├── assets
|
||||
│ ├── build.rs
|
||||
│ ├── Cargo.lock
|
||||
│ ├── Cargo.toml
|
||||
│ ├── icons
|
||||
│ ├── png
|
||||
│ ├── src
|
||||
│ ├ ├──main.rs
|
||||
│ ├ └──pake.js
|
||||
│ ├── tauri.conf.json
|
||||
│ ├── tauri.linux.conf.json
|
||||
│ ├── tauri.macos.conf.json
|
||||
│ └── tauri.windows.conf.json
|
||||
└── tsconfig.json
|
||||
```
|
||||
|
||||
- app.csv:Used for batch replacement and packaging of bash/bat command.
|
||||
- bin:It is written in TypeScript and is the source code of the Pake cli, the Pake command line packaging tool. You can use `npm run cli: build` to generate the final configuration file 'dist cli. js'.
|
||||
- cli.js:The entry file of pake-cli. This file calls the 'dist cli. js' file, which is basically not modified and can be ignored.
|
||||
- dist\cli.js:Generated by `npm run cli: build`.
|
||||
- icns2png.py:Written in python 3, it is used to convert Mac default icns icons to windows/Linux icons in ico and png formats.
|
||||
- package.json:The npm module depends on the configuration file, which is used to build the basic development environment when running `npm i` and `npm run xxx`.
|
||||
- pake-default.icns:The default icon of pake, applicable to MacOS.
|
||||
- script:A script for batch packaging multiple apps, with [sd]( https://github.com/chmln/sd) built-inBinary package. You can use `npm run build: all unix` and `npm run build: all windows` to call the batch packaging function of Mac/Linux and Windows respectively.
|
||||
- src-tauri/assets:It stores a Linux desktop icon configuration file and a Windows msi installation configuration file.
|
||||
- src-tauri/build.rs:The tauri compiler entry does not need to be modified and can be ignored.
|
||||
- src-tauri/Cargo.lock:The cargo package management configuration result file can be ignored.
|
||||
- src-tauri/Cargo.toml:The cargo package depends on the configuration file, which is used to manage the information of various crate versions. It basically does not need to be modified and can be ignored.
|
||||
- src-tauri/icons:A series of icon files in icns format are stored, which are suitable for MacOS application icons.
|
||||
- src-tauri/png:Generated from the icons folder above, it stores ico and png files, which are applicable to Linux/Windows application icons.
|
||||
- src-tauri/src/main.rc:The main program file needs to be modified. The cross platform migration scheme focuses on this.
|
||||
- src-tauri/src/pake.js:The js code matched with the main program file is used to add shortcut key monitoring, page rendering effects, and so on.
|
||||
- src-tauri/tauri.conf.json:The main configuration file is used to control the package name, version number, open link, window size, etc.
|
||||
- src-tauri/tauri.linux.conf.json:The configuration file used when compiling the Linux platform, including Linux specific icons, maintainers, binary formats, mapping, etc.
|
||||
- src-tauri/tauri.macos.conf.json:Configuration files used for compiling the MacOS platform, including MacOS specific icons, maintainers, binary formats, and so on.
|
||||
- src-tauri/tauri.windows.conf.json:The configuration file used when compiling the Windows platform, including Windows specific icons, maintainers, binary formats, small icon mapping in the upper left corner, and so on.
|
||||
- tsconfig.json:TypeScript configuration. It basically does not need to be modified and can be ignored.
|
||||
|
||||
## New pack
|
||||
|
||||
1. Modify the `tauri.conf.json` in the `src-tauri` directory to include 4 fields `url, productName, icon, identifier`, icon can be selected from the `icons` directory or downloaded from [macOSicons](https://macosicons.com/#/) to match the product.
|
||||
2. For window property settings, you can modify the `width/height` of the `windows` property in `tauri.conf.json`, whether it is `fullscreen`, whether it is `resizable`, If you want to adapt the immersive header under Mac, you can set `transparent` to `true` and then find header element and add the `padding-top` style.
|
||||
3. `npm run dev` for local debugging; `npm run dev:debug` to open the devtools for container debugging.
|
||||
4. `npm run build` can be run to package for production.
|
||||
1. The code structure of Pake can be referred to [wiki](https://github.com/tw93/Pake/wiki/Description-of-Pake's-code-structure).
|
||||
2. Modify the `tauri.conf.json` in the `src-tauri` directory to include 4 fields `url, productName, icon, identifier`, icon can be selected from the `icons` directory or downloaded from [macOSicons](https://macosicons.com/#/) to match the product.
|
||||
3. For window property settings, you can modify the `width/height` of the `windows` property in `tauri.conf.json`, whether it is `fullscreen`, whether it is `resizable`, If you want to adapt the immersive header under Mac, you can set `transparent` to `true` and then find header element and add the `padding-top` style.
|
||||
4. `npm run dev` for local debugging; `npm run dev:debug` to open the devtools for container debugging.
|
||||
5. `npm run build` can be run to package for production.
|
||||
|
||||
## Advanced
|
||||
|
||||
@@ -245,9 +172,9 @@ Refer to the communication code in `pake.js` with `postMessage`, write the event
|
||||
|
||||
## Support
|
||||
|
||||
- I have two cats, one is called TangYuan, and one is called Coke, If you think Pake makes your life better, you can give my cats <a href="https://miaoyan.app/cats.html?name=Pake" target="_blank">feed canned food 🥩🍤</a>.
|
||||
- If you like Pake, you can star it in Github. We are more welcome to [recommend Pake](https://twitter.com/intent/tweet?url=https://github.com/tw93/Pake&text=Pake%20-%20A%20simple%20Rust%20packaged%20web%20pages%20to%20generate%20Mac%20App%20tool,%20compared%20to%20traditional%20Electron%20package,%20the%20size%20of%20nearly%2040%20times%20smaller,%20generally%20about%202M,%20the%20underlying%20use%20of%20Tauri,%20performance%20experience%20than%20the%20JS%20framework%20is%20much%20lighter~) to your like-minded friends.
|
||||
- You can follow my [Twitter](https://twitter.com/HiTw93) to get the latest news of Pake, or join [Telegram](https://t.me/miaoyan) chat group.
|
||||
- I have two cats, one is called TangYuan, and one is called Coke, If you think Pake makes your life better, you can give my cats <a href="https://miaoyan.app/cats.html?name=Pake" target="_blank">feed canned food 🥩🍤</a>.
|
||||
- If you like Pake, you can star it in Github. We are more welcome to [recommend Pake](https://twitter.com/intent/tweet?url=https://github.com/tw93/Pake&text=Pake%20-%20A%20simple%20Rust%20packaged%20web%20pages%20to%20generate%20Mac%20App%20tool,%20compared%20to%20traditional%20Electron%20package,%20the%20size%20of%20nearly%2040%20times%20smaller,%20generally%20about%202M,%20the%20underlying%20use%20of%20Tauri,%20performance%20experience%20than%20the%20JS%20framework%20is%20much%20lighter~) to your like-minded friends.
|
||||
- You can follow my [Twitter](https://twitter.com/HiTw93) to get the latest news of Pake, or join [Telegram](https://t.me/miaoyan) chat group.
|
||||
|
||||
## Finally
|
||||
|
||||
|
||||
Reference in New Issue
Block a user