Genfic/Tool · 文件
文件最后提交记录最后更新时间
README.md
Ogma3 Tools
Installation
task install to install the tool locally (requires https://taskfile.dev/)
Tools
Bundle size
Get the size of all bundled Javascript, including after compression with GZip and Brotli
deno run --allow-read ./index.ts bundle-size <glob>
for example
deno run --allow-read ./index.ts bundle-size "G:\VS Projects\Ogma3\Ogma3\wwwroot\js\{dist,bundle}/**/*.js"
Generate imports
Generates CSS imports for all font files in a given directory
deno run --allow-read ./index.ts generate-imports <source> <destination>
for example
deno run --allow-read ./index.ts generate-imports "G:\VS Projects\Ogma3\Ogma3\wwwroot\fonts" "fonts"
Generate preloads
Generates <link> preloads to speed up the loading of font files
deno run --allow-read ./index.ts generate-preloads <source> <destination>
for example
deno run --allow-read ./index.ts generate-preloads "G:\VS Projects\Ogma3\Ogma3\wwwroot\fonts" "fonts"
Generate paths
Despite its name, what it really does is it generates a bunch of functions wrapping fetch() based on the supplied Swagger URLs.
Clients get outputted to <destination> into <name>.ts files, one file per supplied URL
deno run --allow-net --unsafely-ignore-certificate-errors=localhost --allow-read --allow-write ./index.ts generate-paths <destination> --path.<name1>=<url1> --path.<name2>=<url2>
for example
deno run --allow-net --unsafely-ignore-certificate-errors=localhost --allow-read --allow-write ./index.ts generate-paths "out" --path.public="https://localhost:5001/swagger/public/swagger.json" --path.internal="https://localhost:5001/swagger/internal/swagger.json"
will result in
out
|— public.ts
\— internal.ts