Skip to content

Commit

Permalink
fix: cannot delete .pylon folder on re-build on windows
Browse files Browse the repository at this point in the history
ref: #32
  • Loading branch information
schettn committed Oct 9, 2024
1 parent 1c92d7c commit 2816825
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/pylon-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
"dependencies": {
"chokidar": "^3.5.3",
"consola": "^3.2.3",
"source-map-support": "^0.5.21",
"typescript": "^5.0.0",
"esbuild": "^0.23.1",
"esbuild-plugin-tsc": "^0.4.0"
"esbuild-plugin-tsc": "^0.4.0",
"rimraf": "^6.0.1",
"source-map-support": "^0.5.21",
"typescript": "^5.0.0"
},
"engines": {
"node": ">=18.0.0"
Expand Down
3 changes: 2 additions & 1 deletion packages/pylon-builder/src/bundler/bundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import esbuildPluginTsc from 'esbuild-plugin-tsc'

import path from 'path'
import consola from 'consola'
import {rimrafSync} from 'rimraf'

export interface BundlerBuildOptions {
getTypeDefs: () => string
Expand Down Expand Up @@ -76,7 +77,7 @@ export class Bundler {

// Delete the output directory if it exists
if (fs.existsSync(dir)) {
fs.rmSync(dir, {recursive: true})
rimrafSync(dir)
}

const output = await build({
Expand Down

1 comment on commit 2816825

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for pylon-docs ready!

✅ Preview
https://pylon-docs-76cx4it3i-schettns-projects.vercel.app

Built with commit 2816825.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.