Skip to content

g9wp/gm-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gm-bundle

使用 Deno 打包 Tampermonkey/Userscript 脚本的工具。

主要用法

deno run -A jsr:@g9wp/gm-bundle -b userscript_main.ts

参数说明

参数 别名 说明 默认值
--metafile -m 包含 // ==UserScript== 注释块的元文件路径 默认为 --bundle
--bundle -b 打包文件的入口 -
--wrap -w 打包 iife 格式独立脚本 true
--output -o 输出文件路径 默认为 --bundle.user.js 扩展名

示例

# 指定入口文件进行打包
deno run -A jsr:@g9wp/gm-bundle -b src/main.ts

# 指定元文件和输出文件
deno run -A jsr:@g9wp/gm-bundle -m header.meta -b src/main.ts -o dist/script.user.js

# 禁用 iife 包装
deno run -A jsr:@g9wp/gm-bundle -b main.ts -w false

Packages

 
 
 

Contributors