diff --git a/src/pug/index.pug b/src/pug/index.pug index 6aea35fd..98ba9b8e 100644 --- a/src/pug/index.pug +++ b/src/pug/index.pug @@ -27,7 +27,7 @@ block content .action-btns-overflow.flex.flex-grow(class=classValue) .flex-grow .action-btns.justify-end - button.btn#run(type='button') Run + button.btn#build(type='button') Build button.btn.btn-share#share(type='button') Share .file-size-container(title="Original -> Compressed") .file-size Wait... diff --git a/src/pug/layouts/layout.pug b/src/pug/layouts/layout.pug index 3bcd37db..25117ae9 100644 --- a/src/pug/layouts/layout.pug +++ b/src/pug/layouts/layout.pug @@ -54,7 +54,7 @@ html.dark(lang="en") url: "/", websiteURL: "https://bundle.js.org", title: "bundle - a quick npm package size checker", - description: "bundle is a quick and easy way to bundle your js projects, minify and see their gzip size, it's similar to bundlephobia but does all the work locally on your computer and can treeshake and bundle multiple packages (both commonjs and esm) together.", + description: "bundle is a quick and easy way to bundle your js projects, minify and see their compressed gzip or brotli size, it's similar to bundlephobia but does all the work locally on your computer and can treeshake and bundle multiple packages (both commonjs and esm) together.", keywords: "bundle, rollup, esbuild, gzip, minify, es2020, monaco-editor, typescript" }; diff --git a/src/ts/index.ts b/src/ts/index.ts index 1b7ebfe3..6d422e8c 100644 --- a/src/ts/index.ts +++ b/src/ts/index.ts @@ -469,12 +469,12 @@ export const build = (app: App) => { // Listen to events for the results ResultEvents.on("add-module", (v) => { - value = isInitial ? "// Click Run for the Bundled + Minified + Gzipped package size" : `` + inputModel?.getValue(); + value = isInitial ? "// Click Build for the Bundled + Minified + Gzipped package size" : `` + inputModel?.getValue(); inputModel?.setValue((value + "\n" + v).trim()); }); - let RunBtn = Array.from(document.querySelectorAll("#run")) as HTMLElement[]; - RunBtn.forEach(btn => { + let BuildBtn = Array.from(document.querySelectorAll("#build")) as HTMLElement[]; + BuildBtn.forEach(btn => { btn?.addEventListener("click", () => { (async () => { if (!initialized) diff --git a/src/ts/modules/monaco.ts b/src/ts/modules/monaco.ts index 456f4078..a5289381 100644 --- a/src/ts/modules/monaco.ts +++ b/src/ts/modules/monaco.ts @@ -123,7 +123,7 @@ export const JSON_WORKER = new Worker(JSON_WORKER_URL, { name: "json-worker" }); export const outputModelResetValue = "// Output"; export const inputModelResetValue = [ - '// Click Run for the Bundled, Minified & Gzipped package size', + '// Click Build for the Bundled, Minified & Gzipped package size', 'export * from "@okikio/animate";' ].join("\n"); export const configModelResetValue = JSON.stringify(DefaultConfig, null, "\t"); // Indented with tab; diff --git a/src/ts/util/parse-query.ts b/src/ts/util/parse-query.ts index 40c8f332..dab6e40d 100644 --- a/src/ts/util/parse-query.ts +++ b/src/ts/util/parse-query.ts @@ -43,7 +43,7 @@ export const parseTreeshakeExports = (str: string) => * ```ts * "/?q=(import)@okikio/emitter,(import)@okikio/animate,(import)@okikio/animate,(import)@okikio/animate,(import)@okikio/animate,@okikio/animate,@okikio/animate,@okikio/animate,@okikio/animate&treeshake=[T],[{+animate+}],[{+animate+as+B+}],[*+as+TR],[{+type+animate+}],[*],[{+animate+as+A+}],[*+as+PR],[{+animate+}]&share=MYewdgziA2CmB00QHMAUAiAwiG6CUQA" * // to -* // Click Run for the Bundled, Minified & Gzipped package size +* // Click Build for the Bundled, Minified & Gzipped package size * import T from "@okikio/emitter"; * import { animate } from "@okikio/animate"; * import { animate as B } from "@okikio/animate"; @@ -69,7 +69,7 @@ export const parseSearchQuery = (shareURL: URL) => { let queryArr = query.trim().split(","); let treeshakeArr = parseTreeshakeExports((treeshake ?? "").trim()); result += ( - "// Click Run for the Bundled, Minified & Gzipped package size\n" + + "// Click Build for the Bundled, Minified & Compressed package size\n" + queryArr .map((q, i) => { let treeshakeExports =