From c74542aade9e62d0c57641f4d9f8c47d38fbe3af Mon Sep 17 00:00:00 2001 From: junners Date: Sun, 26 Jan 2025 23:22:16 -0800 Subject: [PATCH] feat: use swc on build scripts --- .gitignore | 3 ++- .swcrc | 3 ++- package.json | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index a82ef9c..9adf1ca 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ out/ *.log -coverage/ \ No newline at end of file +coverage/ +types/ \ No newline at end of file diff --git a/.swcrc b/.swcrc index 35268a5..0cf41c2 100644 --- a/.swcrc +++ b/.swcrc @@ -22,5 +22,6 @@ }, "keepClassNames": true, "baseUrl": "./" - } + }, + "minify": true } \ No newline at end of file diff --git a/package.json b/package.json index 33284b2..a7ddada 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lightning-flow-scanner-core", "version": "4.14.0", - "main": "out/index.js", + "main": "index.js", "types": "index.d.ts", "engines": { "node": "^20 || ^22 || ^23" @@ -21,9 +21,9 @@ "swc:build": "swc src --out-dir out", "swc:build:link": "npm run prepack && npm run cp:files && npm link ./out/src", "swc:gen:types": "tsc -p tsconfig.types.json --declaration --emitDeclarationOnly", - "swc:cp:types": "npm run gen:types && cp -R ./types/* ./out/src", + "swc:cp:types": "npm run swc:gen:types && cp -R ./types/* ./out/src", "swc:cp:files": "cp ./readme.md ./package*.json ./out/src && cp -R ./media ./out/src", - "swc:sim:pack": "npm run build && npm run cp:files && npm run cp:types", + "swc:sim:pack": "npm run swc:build && npm run swc:cp:files && npm run swc:cp:types", "postversion": "cp package.json ../.. && cp package-lock.json ../.." }, "keywords": [],