Skip to content

Commit 1a0d423

Browse files
committed
🎨 Output is more standardized
1 parent 02e4440 commit 1a0d423

File tree

3 files changed

+113
-115
lines changed

3 files changed

+113
-115
lines changed

.github/workflows/pake-cli.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,49 +56,49 @@ jobs:
5656
fail-fast: false
5757

5858
steps:
59-
- name: checkout repository
59+
- name: Checkout repository
6060
uses: actions/checkout@v3
6161

62-
- name: install node
62+
- name: Install node
6363
uses: actions/setup-node@v3
6464
with:
6565
node-version: 18
6666

67-
- name: install Rust for ubuntu-20.04
67+
- name: Install Rust for ubuntu-20.04
6868
if: inputs.platform == 'ubuntu-20.04'
6969
uses: dtolnay/rust-toolchain@stable
7070
with:
7171
toolchain: stable
7272
target: x86_64-unknown-linux-musl
7373

74-
- name: install Rust for windows-latest
74+
- name: Install Rust for windows-latest
7575
if: inputs.platform == 'windows-latest'
7676
uses: dtolnay/rust-toolchain@stable
7777
with:
7878
toolchain: stable-x86_64-msvc
7979
target: x86_64-pc-windows-msvc
8080

81-
- name: install Rust for macos-latest
81+
- name: Install Rust for macos-latest
8282
if: inputs.platform == 'macos-latest'
8383
uses: dtolnay/rust-toolchain@stable
8484
with:
8585
toolchain: stable
8686
target: x86_64-apple-darwin
8787

88-
- name: install dependencies (ubuntu only)
88+
- name: Install dependencies (ubuntu only)
8989
if: inputs.platform == 'ubuntu-20.04'
9090
uses: awalsh128/cache-apt-pkgs-action@latest
9191
with:
9292
packages: libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra
9393
version: 1.1
9494

95-
- name: install pake-cli local
95+
- name: Install pake-cli local
9696
shell: bash
9797
run: |
9898
echo "install pake on local"
9999
npm install pake-cli
100100
101-
- name: rust cache restore
101+
- name: Rust cache restore
102102
uses: actions/cache/restore@v3
103103
id: cache_store
104104
with:
@@ -110,12 +110,12 @@ jobs:
110110
node_modules/pake-cli/src-tauri/target/
111111
key: ${{ inputs.platform }}-cargo-${{ hashFiles('node_modules/pake-cli/src-tauri/Cargo.lock') }}
112112

113-
- name: install dependencies
113+
- name: Install dependencies
114114
run: |
115115
npm install shelljs
116116
npm install axios
117117
118-
- name: build with pake-cli
118+
- name: Build with pake-cli
119119
run: |
120120
node ./script/build_with_pake_cli.mjs
121121
env:
@@ -130,14 +130,14 @@ jobs:
130130
MULTI_ARCH: ${{ inputs.multi_arch }}
131131
TARGETS: ${{ inputs.targets }}
132132

133-
- name: upload archive
133+
- name: Upload archive
134134
uses: actions/upload-artifact@v3
135135
with:
136136
name: output-${{ inputs.platform }}.zip
137137
path: node_modules/pake-cli/output/*
138138
retention-days: 3
139139

140-
- name: rust cache store
140+
- name: Rust cache store
141141
uses: actions/cache/save@v3
142142
if: steps.cache_store.outputs.cache-hit != 'true'
143143
with:

apps.conf.json

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,82 @@
11
{
2-
"apps": [
3-
{
4-
"name": "programmusic",
5-
"title": "ProgramMusic",
6-
"name_zh": "ProgramMusic",
7-
"url": "https://musicforprogramming.net/"
8-
},
9-
{
10-
"name": "twitter",
11-
"title": "Twitter",
12-
"name_zh": "推特",
13-
"url": "https://twitter.com/"
14-
},
15-
{
16-
"name": "youtube",
17-
"title": "YouTube",
18-
"name_zh": "YouTube",
19-
"url": "https://www.youtube.com"
20-
},
21-
{
22-
"name": "reference",
23-
"title": "Reference",
24-
"name_zh": "Reference",
25-
"url": "https://quickref.me/zh-CN/"
26-
},
27-
{
28-
"name": "coderunner",
29-
"title": "CodeRunner",
30-
"name_zh": "CodeRunner",
31-
"url": "https://riju.codes/"
32-
},
33-
{
34-
"name": "chatgpt",
35-
"title": "ChatGPT",
36-
"name_zh": "ChatGPT",
37-
"url": "https://chat.openai.com/chat"
38-
},
39-
{
40-
"name": "flomo",
41-
"title": "Flomo",
42-
"name_zh": "浮墨",
43-
"url": "https://v.flomoapp.com/mine"
44-
},
45-
{
46-
"name": "qwerty",
47-
"title": "Qwerty",
48-
"name_zh": "Qwerty",
49-
"url": "https://qwerty.kaiyi.cool/"
50-
},
51-
{
52-
"name": "lizhi",
53-
"title": "LiZhi",
54-
"name_zh": "李志",
55-
"url": "https://lizhi.turkyden.com/?from=pake"
56-
},
57-
{
58-
"name": "xiaohongshu",
59-
"title": "XiaoHongShu",
60-
"name_zh": "小红书",
61-
"url": "https://www.xiaohongshu.com/explore"
62-
},
63-
{
64-
"name": "poe",
65-
"title": "Poe",
66-
"name_zh": "Poe",
67-
"url": "https://poe.com/"
68-
},
69-
{
70-
"name": "youtubemusic",
71-
"title": "YouTubeMusic",
72-
"name_zh": "YouTubeMusic",
73-
"url": "https://music.youtube.com/"
74-
},
75-
{
76-
"name": "weread",
77-
"title": "WeRead",
78-
"name_zh": "微信阅读",
79-
"url": "https://weread.qq.com/"
80-
}
81-
]
82-
}
2+
"apps": [
3+
{
4+
"name": "programmusic",
5+
"title": "ProgramMusic",
6+
"name_zh": "ProgramMusic",
7+
"url": "https://musicforprogramming.net/"
8+
},
9+
{
10+
"name": "twitter",
11+
"title": "Twitter",
12+
"name_zh": "推特",
13+
"url": "https://twitter.com/"
14+
},
15+
{
16+
"name": "youtube",
17+
"title": "YouTube",
18+
"name_zh": "YouTube",
19+
"url": "https://www.youtube.com"
20+
},
21+
{
22+
"name": "reference",
23+
"title": "Reference",
24+
"name_zh": "Reference",
25+
"url": "https://quickref.me/zh-CN/"
26+
},
27+
{
28+
"name": "coderunner",
29+
"title": "CodeRunner",
30+
"name_zh": "CodeRunner",
31+
"url": "https://riju.codes/"
32+
},
33+
{
34+
"name": "chatgpt",
35+
"title": "ChatGPT",
36+
"name_zh": "ChatGPT",
37+
"url": "https://chat.openai.com/chat"
38+
},
39+
{
40+
"name": "flomo",
41+
"title": "Flomo",
42+
"name_zh": "浮墨",
43+
"url": "https://v.flomoapp.com/mine"
44+
},
45+
{
46+
"name": "qwerty",
47+
"title": "Qwerty",
48+
"name_zh": "Qwerty",
49+
"url": "https://qwerty.kaiyi.cool/"
50+
},
51+
{
52+
"name": "lizhi",
53+
"title": "LiZhi",
54+
"name_zh": "李志",
55+
"url": "https://lizhi.turkyden.com/?from=pake"
56+
},
57+
{
58+
"name": "xiaohongshu",
59+
"title": "XiaoHongShu",
60+
"name_zh": "小红书",
61+
"url": "https://www.xiaohongshu.com/explore"
62+
},
63+
{
64+
"name": "poe",
65+
"title": "Poe",
66+
"name_zh": "Poe",
67+
"url": "https://poe.com/"
68+
},
69+
{
70+
"name": "youtubemusic",
71+
"title": "YouTubeMusic",
72+
"name_zh": "YouTubeMusic",
73+
"url": "https://music.youtube.com/"
74+
},
75+
{
76+
"name": "weread",
77+
"title": "WeRead",
78+
"name_zh": "微信阅读",
79+
"url": "https://weread.qq.com/"
80+
}
81+
]
82+
}

script/build_with_pake_cli.mjs

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,22 @@ const { exec, cd, mv } = shelljs;
99
const __filename = fileURLToPath(import.meta.url);
1010
const __dirname = dirname(__filename);
1111

12-
console.log("Welcome to use Pake Cli");
13-
console.log("\n=======================");
14-
console.log("build for app");
15-
console.log("Node.js info in your localhost ", process.version);
16-
console.log("\n=======================\n");
17-
18-
console.log("\n=======================");
19-
console.log("pake parameters is: ");
20-
console.log("url: ", process.env.URL);
21-
console.log("name: ", process.env.NAME);
22-
console.log("icon: ", process.env.ICON);
23-
console.log("height: ", process.env.HEIGHT);
24-
console.log("width: ", process.env.WIDTH);
25-
console.log("transparent: ", process.env.TRANSPARENT);
26-
console.log("resize: ", process.env.RESIZE);
27-
console.log("is multi arch? only for Mac: ", process.env.MULTI_ARCH);
28-
console.log("targets type? only for Linux: ", process.env.TARGETS);
29-
console.log("===========================\n");
12+
console.log('Welcome to use Pake Cli');
13+
console.log('\n=======================');
14+
console.log('build for app');
15+
console.log('Node.js info in your localhost ', process.version);
16+
console.log('\n=======================\n');
17+
console.log('Pake parameters is: ');
18+
console.log('url: ', process.env.URL);
19+
console.log('name: ', process.env.NAME);
20+
console.log('icon: ', process.env.ICON);
21+
console.log('height: ', process.env.HEIGHT);
22+
console.log('width: ', process.env.WIDTH);
23+
console.log('transparent: ', process.env.TRANSPARENT);
24+
console.log('resize: ', process.env.RESIZE);
25+
console.log('is multi arch? only for Mac: ', process.env.MULTI_ARCH);
26+
console.log('targets type? only for Linux: ', process.env.TARGETS);
27+
console.log('===========================\n');
3028

3129
cd('node_modules/pake-cli');
3230
let params = `node cli.js ${process.env.URL} --name ${process.env.NAME}`;
@@ -36,7 +34,7 @@ if (process.env.ICON) {
3634
axios({
3735
method: 'get',
3836
url: process.env.ICON,
39-
responseType: 'stream'
37+
responseType: 'stream',
4038
}).then(function (response) {
4139
response.data.pipe(fs.createWriteStream(iconPath));
4240
params = `${params} --icon ${iconPath}`;
@@ -74,13 +72,13 @@ if (process.platform === 'darwin') {
7472
params = `${params} --show-menu`;
7573
}
7674

77-
console.log("Pake parameters is: ", params);
78-
console.log("compile....");
75+
console.log('Pake parameters is: ', params);
76+
console.log('Compile....');
7977
exec(params);
8078

8179
if (!fs.existsSync('output')) {
8280
fs.mkdirSync('output');
8381
}
8482
mv(`${process.env.NAME}.*`, 'output/');
85-
console.log("Build Success");
83+
console.log('Build Success');
8684
cd('../..');

0 commit comments

Comments
 (0)