From 4df1d37ddc54242c339765f22fb90ba2e9e3a99a Mon Sep 17 00:00:00 2001 From: dave caruso Date: Thu, 1 Jun 2023 21:16:47 -0400 Subject: Bundle and minify `.exports.js` files. (#3036) * move all exports.js into src/js * finalize the sort of this * and it works * add test.ts to gitignore * okay * convert some to ts just to show * finish up * fixup makefile * minify syntax in dev * finish rebase * dont minify all modules * merge * finish rebase merge * flaky test that hangs --- src/bun.js/builtins/codegen/helpers.ts | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 src/bun.js/builtins/codegen/helpers.ts (limited to 'src/bun.js/builtins/codegen/helpers.ts') diff --git a/src/bun.js/builtins/codegen/helpers.ts b/src/bun.js/builtins/codegen/helpers.ts deleted file mode 100644 index 6345f8ffa..000000000 --- a/src/bun.js/builtins/codegen/helpers.ts +++ /dev/null @@ -1,25 +0,0 @@ -export function fmtCPPString(str: string) { - return ( - '"' + - str - .replace(/\\/g, "\\\\") - .replace(/"/g, '\\"') - .replace(/\n/g, "\\n") - .replace(/\r/g, "\\r") - .replace(/\t/g, "\\t") - .replace(/\?/g, "\\?") + // https://stackoverflow.com/questions/1234582 - '"' - ); -} - -export function cap(str: string) { - return str[0].toUpperCase() + str.slice(1); -} - -export function low(str: string) { - if (str.startsWith("JS")) { - return "js" + str.slice(2); - } - - return str[0].toLowerCase() + str.slice(1); -} -- cgit v1.2.3