Skip to content

Commit 22499bb

Browse files
authored
Merge pull request #31 from Tencent/fix/compat-windows
fix: lite for windows
2 parents 7182ce1 + 42b3cce commit 22499bb

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.3.1 `2022-08-23`
2+
3+
### Bug Fixes
4+
5+
- 修复下载 `Lite` 版本指令在 windows 系统的使用问题
6+
17
## 0.3.0 `2022-08-22`
28

39
### Features

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tdesign-starter-cli",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"description": "CLI tool for TDesign Starter project",
55
"main": "./src/main.ts",
66
"lib": "./bin/index.js",

src/core/core-lite/CoreLiteDownloader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class CoreLiteDownloader extends CoreGitDownloader {
4545
*/
4646
protected async copyTemplate(options: { type: SupportedTemplate; name: string; description: string }): Promise<any> {
4747
let copyFolderName = 'vue-lite';
48-
const destDir = path.join(`${process.env.PWD}`, options.name);
48+
const destDir = path.resolve(process.cwd(), options.name);
4949
// console.log('options.type==>', options.type);
5050
switch (options.type) {
5151
case 'vue2':
@@ -58,7 +58,7 @@ export class CoreLiteDownloader extends CoreGitDownloader {
5858
copyFolderName = 'react-lite';
5959
break;
6060
}
61-
const srcDir = path.join(__dirname, `templates/${copyFolderName}`);
61+
const srcDir = path.resolve(__dirname, path.posix.join('templates', copyFolderName));
6262

6363
try {
6464
await fse.copy(srcDir, destDir);

0 commit comments

Comments
 (0)