Skip to content

Commit

Permalink
fix: #26
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonxiang committed Sep 27, 2024
1 parent a285c4d commit b329b5b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/core/src/node/io.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import fs from 'node:fs';
import path from 'node:path';
import { handleError } from '../utils/log.js';
import { parseProtoFiles } from '../core.js';
import { defaultFilename } from '../constant.js';

const { mkdirSync, readdirSync, writeFileSync } = fs;

Expand All @@ -28,6 +29,10 @@ export function transformProtoFiles(options) {
if (!res) return;

mkdirSync(outputDir, { recursive: true });

if(res.has(defaultFilename)) {
res.delete(defaultFilename);
}

res.forEach((value, key) => {
const outputFile = path.join(outputDir, key);
Expand Down

0 comments on commit b329b5b

Please sign in to comment.