From 6da6bd1474738ac174403d435ff398d8d98f611e Mon Sep 17 00:00:00 2001 From: Phumrapee Limpianchop Date: Sun, 11 Feb 2024 07:00:09 +0900 Subject: [PATCH] refactor: bundling --- bun.lockb | Bin 261516 -> 261692 bytes commons/package.json | 22 ++++++++++++++++++++-- commons/tsconfig.json | 15 +++++++++++++++ commons/tsup.config.ts | 10 ++++++++++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 commons/tsconfig.json create mode 100644 commons/tsup.config.ts diff --git a/bun.lockb b/bun.lockb index 9575ead446aa46912b50ad919bd3621b664991ff..51a2386d1f7299855d5464377385adda9ac54815 100755 GIT binary patch delta 9787 zcmeI2d303e8HexONq|HlkN`;tm>`6JNXUYRMFJ=wi>y*;kTvWet3Z%-B5TAb%ZOK5 zO02fWBA&|OXk1t7`~%6<==lFR98ElTTUivHVr3^4+J~B!&?%Ic^NH!FGC0Cj4Sj}R`Me&urgAAVOl7BH ztI0r`B^p}>sgh01-xO7Y8K?@jG&|Gctcodw{-KsHTy_6Bw_6}w)x%-+#b;O4u zjrKb^NGK8NSq%$ZjjEz}l`>VGb!7+NJ(`#;Z#|1j)s6aQOJygbay5_!&z?*TsE%~= zHb<4K1uB0_(^eMGvUs-nb5UL0c4l`#_3?H?buv9s)z{0kH_FTD%bV)&@8@DG;~;Yk zwhZ}Z-){B@R3|^y{Nv3($?Pd+PcwUl=`8clF`b91!;4V0TjaOFZW#{sXoY1gHhZ;c ziTT%-Jk}MUcYN=06n5q@O`J>D)mA{(#tD8Su>l1H;Un5&ni-)T^ zoDs#HrUsi^MJ+62RjTf15?8}nmM>gYPqxK#EiTm^+8$Md9Z}`Wvv^*V-DzFS5w0rG z)e3a8xK#cgW>=-^U@wbHmA?EV5$69N^z!F0(h7#Fo|O}<;)$k{ET2>znPPUh>U%O9e{FObs*WwUd{QNg zO-uASD8qd?r1vZOD^(p>Yx$)rzs_u_?DeQ_AP?0Y`8$jMsDYn5u=T+`Vt%RY$52)H z2lIz(E&MypF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d8!k&^q>aYKv(-#+SeA}Y4)wc$16A)daJ;8gY!x$pBYVFz$dNauJ^Fkp>~wD zu&MX3&c61P3!+U6!ii0PN9!-Z@8Lyw30{sGE(|Nn|3>kB_$z4Uij%=m~fdw!l;HG-y8QQFt6yGLqGx$*o)9*64yo;i)N| z|2p4i!j(`9YC|sML0vcw3ZNd;hX&9Pnm{usgd!-0B~hv?8Hp{Mj%E=E6Mq37ikQK54>Ae~B0ZLqUI=7ytudP=aq@-)P@;VM$60 z5J|?G0L=lfg4Liu8|eC_uew$d*MPo@`tDr~x_&JHEph7FsP*>&)Efx8o^^pTXbYdv zhpuO@gBEJEi1P^Cl?+OPjuaA5O(Wew7dNf;uS-OCE)AQfR#ILB7sC|L-zG+bE_j-a z8xH4!{txmFpQBb%a_Dpx_H-CTc`%#}S~0Fe{AK6?J>dX8tuX6aq(2SZ3!2Ay3?5Ge zWtoNjCo#6b)9?&zg=gV8cphGWm*JIY>aws!-WwEmz?;$fWnpRRR}>e3{?IWA^be7t z3}=Xj1T10(b>TQDfO=3L${136=m15KfW6fHJ7}G=A?WV|``{nYiMOxY@O$VE^i9~A z!y4jWC`^C@R5%Z9L~;{o3Wczn3j0C#zkM(WZosdL@VEGN)7k(Xse1_3g8C59^xqiJ zjYc;X-AJ^gT#l`qh3*YM&Y5`RhHx52E(7QTy+}F}^w$@4qAU9h=ub{B=nK7}8=L`s z+?hJO9JH$2N2ey+o^7e|cQr{Cm*gh8m31jACw|qXnY7@e{=1&OU{#|=xzTGRBy!VxnF4~oMyS_|p_e76XC0jS#HE?X+mS?&S+hcc8 z^ler0%;>D@M3?-*I!)OoRY#9kC0j*bRVPo#f56VI)zR^Xk`wBFW4pRK8I`OE+eQx@ HN^bZUCa_7d diff --git a/commons/package.json b/commons/package.json index ba607f4cc..f9637e4e4 100644 --- a/commons/package.json +++ b/commons/package.json @@ -1,5 +1,23 @@ { "name": "@riffyh/commons", + "version": "1.0.0", "main": "src/index.ts", - "private": true -} \ No newline at end of file + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/rayriffy/rayriffy-h.git" + }, + "files": [ + "src/" + ], + "dependencies": { + "lodash": "4.17.21" + }, + "devDependencies": { + "@types/lodash": "4.14.202", + "tsup": "8.0.2" + } +} diff --git a/commons/tsconfig.json b/commons/tsconfig.json new file mode 100644 index 000000000..7931250aa --- /dev/null +++ b/commons/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es2016", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "outDir": "dist", + "types": ["bun-types"] + }, + "include": [ + "src/**/*.ts" + ] +} diff --git a/commons/tsup.config.ts b/commons/tsup.config.ts new file mode 100644 index 000000000..83e910ad2 --- /dev/null +++ b/commons/tsup.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'tsup' + +export default defineConfig({ + entry: ['src/index.ts'], + splitting: false, + sourcemap: true, + dts: true, + outDir: 'dist', + clean: true, +})