Skip to content

Commit fb536c2

Browse files
committed
build: 📦 为资源下载器添加元数据
1 parent 1d31aa5 commit fb536c2

4 files changed

Lines changed: 40 additions & 2 deletions

File tree

apps/libs/downloader/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "module",
44
"version": "1.0.1",
55
"private": true,
6-
"description": "资源下载器(下载资源、Zip 压缩、下载到本地)",
6+
"description": "Downloader -- 资源下载器(下载资源、Zip 压缩、下载到本地)",
77
"author": {
88
"name": "xiaohuohumax",
99
"url": "https://github.com/xiaohuohumax"
@@ -26,6 +26,7 @@
2626
"p-limit": "^7.2.0"
2727
},
2828
"devDependencies": {
29-
"@types/tampermonkey": "^5.0.5"
29+
"@types/tampermonkey": "^5.0.5",
30+
"vite-plugin-banner": "^0.8.1"
3031
}
3132
}

apps/libs/downloader/vite.config.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
import { defineConfig } from 'vite'
2+
import banner from 'vite-plugin-banner'
3+
import { author, description, version } from './package.json'
24

35
export default defineConfig({
6+
plugins: [
7+
banner({
8+
content: `// ==UserScript==
9+
// @name Downloader 资源下载器(下载资源、Zip 压缩、下载到本地)
10+
// @namespace xiaohuohumax/userscripts/downloader
11+
// @version ${version}
12+
// @author ${author.name}
13+
// @description ${description}
14+
// @license MIT
15+
// @icon https://raw.githubusercontent.com/xiaohuohumax/logo/refs/heads/main/logos/logo.svg
16+
// @source https://github.com/xiaohuohumax/userscripts.git
17+
// ==/UserScript==
18+
`,
19+
verify: false,
20+
}),
21+
],
422
build: {
523
outDir: '../../../dist/',
624
minify: false,

dist/downloader.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
// ==UserScript==
2+
// @name Downloader 资源下载器(下载资源、Zip 压缩、下载到本地)
3+
// @namespace xiaohuohumax/userscripts/downloader
4+
// @version 1.0.1
5+
// @author xiaohuohumax
6+
// @description 资源下载器(下载资源、Zip 压缩、下载到本地)
7+
// @license MIT
8+
// @icon https://raw.githubusercontent.com/xiaohuohumax/logo/refs/heads/main/logos/logo.svg
9+
// @source https://github.com/xiaohuohumax/userscripts.git
10+
// ==/UserScript==
11+
112
var downloader = function() {
213
"use strict";var __defProp = Object.defineProperty;
314
var __typeError = (msg) => {

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)