Skip to content

Commit 9125ec4

Browse files
committed
chore: ⏪ 项目改名
1 parent 73a439f commit 9125ec4

9 files changed

Lines changed: 45 additions & 38 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020

2121
| 名称 | 功能 | 使用 |
2222
| ------------------------------------------------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
23-
| [downloader](./apps/libs/downloader/README.md) | 资源下载器(下载资源、Zip 压缩、下载到本地) | [🐒Greasy Fork](https://greasyfork.org/zh-CN/scripts/559087) \| [🐱Script Cat](https://scriptcat.org/zh-CN/script-show-page/4893) |
23+
| [zip-downloader](./apps/libs/zip-downloader/README.md) | 资源下载器(下载资源、Zip 压缩、下载到本地) | [🐒Greasy Fork](https://greasyfork.org/zh-CN/scripts/559087) \| [🐱Script Cat](https://scriptcat.org/zh-CN/script-show-page/4893) |
2424
| [xpath-selector](./apps/libs/xpath-selector/README.md) | 一个 XPath 选择器库,快速节点获取数据 | [🐒Greasy Fork](https://greasyfork.org/zh-CN/scripts/559142) \| [🐱Script Cat](https://scriptcat.org/zh-CN/script-show-page/4900) |
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# downloader
1+
# zip-downloader
2+
3+
## 2.0.0
4+
5+
### Major Changes
6+
7+
- 项目换名
28

39
## 1.2.2
410

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Downloader
1+
# Zip Downloader
22

33
**资源下载器(下载资源、Zip 压缩、下载到本地)**
44

5-
<a href="https://github.com/xiaohuohumax/userscripts/tree/main/apps/libs/downloader">
5+
<a href="https://github.com/xiaohuohumax/userscripts/tree/main/apps/libs/zip-downloader">
66
<img src="https://img.shields.io/badge/GITHUB-项目地址-brightgreen?style=for-the-badge&logo=github" alt="项目地址" />
77
</a>
88
<a href="https://github.com/xiaohuohumax/userscripts/blob/main/LICENSE">
99
<img src="https://img.shields.io/badge/MIT-开源协议-orange?style=for-the-badge&logo=github" alt="开源协议" />
1010
</a>
11-
<a href="https://github.com/xiaohuohumax/userscripts/blob/main/apps/libs/downloader/CHANGELOG.md">
11+
<a href="https://github.com/xiaohuohumax/userscripts/blob/main/apps/libs/zip-downloader/CHANGELOG.md">
1212
<img src="https://img.shields.io/badge/CHANGELOG-更新日志-blue?style=for-the-badge&logo=github" alt="更新日志" />
1313
</a>
1414
<a href="https://github.com/xiaohuohumax/userscripts/issues">
@@ -20,7 +20,7 @@
2020
### ✍ 添加元数据
2121

2222
```typescript
23-
// @require https://**/downloader.js?*
23+
// @require https://**/zip-downloader.js?*
2424
// @grant GM_download
2525
```
2626

@@ -48,7 +48,7 @@
4848
**下载,压缩,并保存到本地**
4949

5050
```typescript
51-
await downloader({
51+
await zipDownloader({
5252
filename: 'index.zip',
5353
resources: [
5454
{ name: 'index.html', url: location.href },
@@ -67,7 +67,7 @@ await downloader({
6767
**仅下载和压缩**
6868

6969
```typescript
70-
const blob = await downloader({
70+
const blob = await zipDownloader({
7171
resources: [
7272
{ name: 'index.html', url: location.href },
7373
{
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "downloader",
2+
"name": "zip-downloader",
33
"type": "module",
4-
"version": "1.2.2",
4+
"version": "2.0.0",
55
"private": true,
6-
"description": "Downloader -- 资源下载器(下载资源、Zip 压缩、下载到本地)",
6+
"description": "Zip Downloader -- 资源下载器(下载资源、Zip 压缩、下载到本地)",
77
"author": {
88
"name": "xiaohuohumax",
99
"url": "https://github.com/xiaohuohumax"
@@ -16,7 +16,8 @@
1616
"keywords": [
1717
"typescript",
1818
"tampermonkey",
19-
"downloader"
19+
"downloader",
20+
"zip"
2021
],
2122
"scripts": {
2223
"build": "vite build --emptyOutDir=false"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ export interface ZipOptions extends OptionsBase { }
3535

3636
export type Options = ZipOptions | SaveOptions
3737

38-
export default async function downloader(options: SaveOptions): Promise<void>
39-
export default async function downloader(options: ZipOptions): Promise<Blob>
40-
export default async function downloader(options: Options): Promise<void | Blob> {
38+
export default async function zipDownloader(options: SaveOptions): Promise<void>
39+
export default async function zipDownloader(options: ZipOptions): Promise<Blob>
40+
export default async function zipDownloader(options: Options): Promise<void | Blob> {
4141
const writer = new ZipWriter(new BlobWriter('application/zip'))
4242
const limit = pLimit(options.concurrency || 10)
4343
await Promise.all(options.resources.map((resource, index) => limit(async () => {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export default defineConfig({
66
plugins: [
77
banner({
88
content: `// ==UserScript==
9-
// @name Downloader 资源下载器(下载资源、Zip 压缩、下载到本地)
10-
// @namespace xiaohuohumax/userscripts/downloader
9+
// @name Zip Downloader 资源下载器(下载资源、Zip 压缩、下载到本地)
10+
// @namespace xiaohuohumax/userscripts/zip-downloader
1111
// @version ${version}
1212
// @author ${author.name}
1313
// @description ${description}
@@ -23,8 +23,8 @@ export default defineConfig({
2323
lib: {
2424
entry: 'src/index.ts',
2525
formats: ['iife'],
26-
fileName: () => 'downloader.js',
27-
name: 'downloader',
26+
fileName: () => 'zip-downloader.js',
27+
name: 'zipDownloader',
2828
},
2929
},
3030
})
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// ==UserScript==
2-
// @name Downloader 资源下载器(下载资源、Zip 压缩、下载到本地)
3-
// @namespace xiaohuohumax/userscripts/downloader
4-
// @version 1.2.2
2+
// @name Zip Downloader 资源下载器(下载资源、Zip 压缩、下载到本地)
3+
// @namespace xiaohuohumax/userscripts/zip-downloader
4+
// @version 2.0.0
55
// @author xiaohuohumax
6-
// @description Downloader -- 资源下载器(下载资源、Zip 压缩、下载到本地)
6+
// @description Zip Downloader -- 资源下载器(下载资源、Zip 压缩、下载到本地)
77
// @license MIT
88
// ==/UserScript==
99

10-
var downloader = function() {
10+
var zipDownloader = function() {
1111
"use strict";var __defProp = Object.defineProperty;
1212
var __typeError = (msg) => {
1313
throw TypeError(msg);
@@ -4620,7 +4620,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
46204620
return bitFlag;
46214621
}
46224622
try {
4623-
configure({ baseURI: _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("downloader.js", document.baseURI).href });
4623+
configure({ baseURI: _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("zip-downloader.js", document.baseURI).href });
46244624
} catch {
46254625
}
46264626
const A = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -6631,7 +6631,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
66316631
function isSaveOptions(options) {
66326632
return "filename" in options;
66336633
}
6634-
async function downloader2(options) {
6634+
async function zipDownloader2(options) {
66356635
const writer = new ZipWriter(new BlobWriter("application/zip"));
66366636
const limit = pLimit(options.concurrency || 10);
66376637
await Promise.all(options.resources.map((resource, index) => limit(async () => {
@@ -6646,5 +6646,5 @@ var __privateWrapper = (obj, member, setter, getter) => ({
66466646
}
66476647
GM_download(URL.createObjectURL(blob), options.filename);
66486648
}
6649-
return downloader2;
6649+
return zipDownloader2;
66506650
}();

pnpm-lock.yaml

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)