Skip to content

Commit

Permalink
fix: rename run button to build
Browse files Browse the repository at this point in the history
  • Loading branch information
okikio authored Mar 12, 2022
1 parent f7ad05e commit 6fb0ee3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/pug/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down
2 changes: 1 addition & 1 deletion src/pug/layouts/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};
Expand Down
6 changes: 3 additions & 3 deletions src/ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ts/modules/monaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/ts/util/parse-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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 =
Expand Down

0 comments on commit 6fb0ee3

Please sign in to comment.