Skip to content

Commit

Permalink
fix: compile outDir wrongly
Browse files Browse the repository at this point in the history
  • Loading branch information
Xu22Web committed Aug 28, 2022
1 parent 4b3ae20 commit 66eb8a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ const handleCompile = async (
// 编译后的文件名
const compileName = getFileName(name);
// 编译路径
const compiltPath = path.resolve(outDir, name);
const compiltPath = path.resolve(rootDir, outDir, compileName);
// 相对
const compiltelativePath = path.join(rootDir, outDir, name);
const compiltelativePath = path.join(rootDir, outDir, compileName);
resolve({
data,
compileName,
Expand Down Expand Up @@ -285,6 +285,7 @@ const main = async () => {
break;
}
fullData.push(data);

progress.start(`正在导出文件... ${chalk.blueBright(compiltPath)}`);
fs.writeFileSync(compiltPath, fullData.join('\n'));
progress.succeed(`导出文件: ${chalk.blueBright(compiltelativePath)}!`);
Expand Down

0 comments on commit 66eb8a8

Please sign in to comment.