Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/init command add source root #15991

Merged
merged 8 commits into from
Jul 4, 2024
Merged
Prev Previous commit
Next Next commit
feat: 增加templates mkdirp逻辑
  • Loading branch information
weiyanhai committed Jun 27, 2024
commit 3ab7d9097220175bfe2304a8306a237c18fd2b72
1 change: 1 addition & 0 deletions packages/taro-cli/src/create/fetchTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default function fetchTemplate (templateSource: string, templateRootPath:
return new Promise<void>(async (resolve) => {
// 下载文件的缓存目录
if (fs.existsSync(tempPath)) await fs.remove(tempPath)
await fs.mkdirp(templateRootPath)
await fs.mkdir(tempPath)

const spinner = ora(`正在从 ${templateSource} 拉取远程模板...`).start()
Expand Down