Skip to content

Commit

Permalink
使用 tsup 编译
Browse files Browse the repository at this point in the history
  • Loading branch information
SOVLOOKUP committed Oct 16, 2023
1 parent eb8f2a4 commit 917cf2a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"json.schemas": [
{
"url": "https://cdn.jsdelivr.net/npm/tsup/schema.json",
"fileMatch": [
"package.json",
"tsup.config.json"
]
}
]
}
26 changes: 20 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{
"name": "rubick-native",
"version": "0.0.10-beta",
"version": "0.0.10",
"type": "module",
"main": "dist/index.js",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc -d",
"build": "tsup --cjsInterop",
"prepublishOnly": "node ./prepub.cjs"
},
"devDependencies": {
"@types/node": "^20.8.0",
"@types/node": "^20.8.6",
"picomatch": "^2.3.1",
"tsup": "^7.2.0",
"typescript": "^5.2.2"
},
"dependencies": {
Expand All @@ -26,5 +27,18 @@
"addon/package.json",
"addon/index.js",
"addon/index.d.ts"
]
}
],
"tsup": {
"entry": [
"src/index.ts"
],
"format": [
"cjs",
"esm"
],
"clean": true,
"dts": true,
"treeshake": true,
"shims": true
}
}
3 changes: 2 additions & 1 deletion src/folder.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { activeWindow } from "@miniben90/x-win"
import { execa } from "execa";
import EXECA from "execa";
import { lstat } from "fs/promises"
import { homedir } from "os"
import { join } from "path"
const { execa } = EXECA

// 获取活动的文件夹路径
export const getFolderOpenPath = async () => {
Expand Down

0 comments on commit 917cf2a

Please sign in to comment.