Skip to content

Commit

Permalink
chore: 兼容Windows构建
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 30, 2023
1 parent 7e26b75 commit d6939e9
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 423 deletions.
5 changes: 5 additions & 0 deletions esbuild.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,24 @@
*/

const path = require("path")
const os = require("os")
const minimist = require("minimist")
const stylePlugin = require("esbuild-style-plugin")
const { copy } = require("esbuild-plugin-copy")

const args = minimist(process.argv.slice(2))
const isWatch = args.watch || args.w || false
const isServe = args.serve || args.s || false
const isWindows = os.platform() === "win32"

let baseDir
if (isWatch || isServe) {
baseDir = "/Users/terwer/Documents/mydocs/SiYuanWorkspace/test/data/plugins/siyuan-plugin-publisher"
// baseDir = "/Users/zhangyue/Documents/terwer/SiyuanWorkspace/test/data/plugins/siyuan-plugin-publisher"
// baseDir = "/Users/terwer/Documents/mydocs/SiYuanWorkspace/public/data/plugins/siyuan-plugin-publisher"
if (isWindows) {
baseDir = "C:\\Users\\terwer\\Documents\\mydocs\\SiyuanWorkspace\\test\\data\\plugins\\siyuan-plugin-publisher"
}
} else {
baseDir = "./"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"syncWidgetRepo": "python scripts/sync_widget_repo.py"
},
"devDependencies": {
"@terwer/esbuild-config-custom": "^1.2.0",
"@terwer/eslint-config-custom": "^1.3.6",
"@types/crypto-js": "^4.1.1",
"@types/node": "^18.17.12",
Expand All @@ -53,6 +52,7 @@
},
"dependencies": {
"@element-plus/icons-vue": "^2.1.0",
"@terwer/esbuild-config-custom": "^2.0.0",
"@vueuse/components": "^10.4.1",
"@vueuse/core": "^10.4.1",
"chatgpt": "^5.2.5",
Expand Down
Loading

0 comments on commit d6939e9

Please sign in to comment.