Skip to content

Commit

Permalink
fix: 修复 ci 运行时发现的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
rxliuli committed Aug 8, 2024
1 parent 2ec76be commit a0d9748
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 28 deletions.
3 changes: 2 additions & 1 deletion packages/joplin-publisher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"typescript": "^5.4.5",
"vite": "^5.1.3",
"vite-node": "^1.6.0",
"vite-plugin-static-copy": "^1.0.5"
"vite-plugin-static-copy": "^1.0.5",
"winston": "^3.8.2"
}
}
1 change: 1 addition & 0 deletions packages/jpl-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"devDependencies": {
"@liuli-util/vite-plugin-node": "^0.9.0",
"@types/fs-extra": "^11.0.4",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.13.0",
"typescript": "^5.5.4",
Expand Down
5 changes: 3 additions & 2 deletions packages/jpl-vite/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { build as viteBuild, UserConfig, mergeConfig, loadEnv } from 'vite'
import { ResolvedPluginConfig } from '.'
import { omit } from 'lodash-es'
import { readFile, writeFile } from 'fs/promises'
import { pathExists } from 'fs-extra'
import { mkdirp, pathExists } from 'fs-extra/esm'
import { bundleRequire } from 'bundle-require'

function devMode(config: UserConfig) {
Expand Down Expand Up @@ -83,7 +83,8 @@ async function emitManifest(config: ResolvedPluginConfig) {
const content = omit(config, 'vite')
const pkg = JSON.parse(await readFile(path.resolve(config.root, 'package.json'), 'utf-8'))
content.version = pkg.version
await writeFile(path.resolve('dist/manifest.json'), JSON.stringify(content, null, 2))
await mkdirp(path.resolve(config.root, 'dist'))
await writeFile(path.resolve(config.root, 'dist/manifest.json'), JSON.stringify(content, null, 2))
}

export async function build(config: ResolvedPluginConfig) {
Expand Down
35 changes: 10 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a0d9748

Please sign in to comment.