diff --git a/.swcrc b/.swcrc new file mode 100644 index 0000000..cbc49b5 --- /dev/null +++ b/.swcrc @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/swcrc", + "minify": true, + "jsc": { + "target": "esnext", + "parser": { + "syntax": "typescript" + } + } +} diff --git a/bun.lockb b/bun.lockb index 778de21..37e73a1 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 1278d83..0696eea 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,25 @@ { "name": "huskybc", - "module": "src/index.ts", + "module": "build/src/index.js", "type": "module", + "version": "0.0.1", "scripts": { "prepare": "husky", "lint": "eslint src", "lint:fix": "eslint src --fix", "format": "prettier src --check", - "format:write": "prettier src --write" + "format:write": "prettier src --write", + "build": "swc src -d build --config-file .swcrc --ignore src/types", + "prepublishOnly": "bun run build" + }, + "dependencies": { + "commander": "12.0.0" }, "devDependencies": { "@commitlint/cli": "19.3.0", "@commitlint/config-conventional": "19.2.2", + "@swc/cli": "0.3.12", + "@swc/core": "1.4.17", "@types/bun": "1.1.0", "@typescript-eslint/eslint-plugin": "^7.0.1", "eslint": "^8.0.1", @@ -24,8 +32,5 @@ "markdownlint": "0.34.0", "prettier": "3.2.5", "typescript": "5.4.5" - }, - "dependencies": { - "commander": "12.0.0" } }