GithubHelp home page GithubHelp logo

tencent / tdesign-starter-cli Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 14.0 2.47 MB

CLI tool for TDesign Starter kit

License: MIT License

JavaScript 5.83% Shell 0.21% TypeScript 86.85% HTML 2.94% Vue 4.17%

tdesign-starter-cli's People

Contributors

1166544 avatar 94dreamer avatar fengyon avatar sscode02 avatar timi137137 avatar uyarn avatar xiaosansiji avatar xiezongchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tdesign-starter-cli's Issues

vue3 通用模板版本 自定义选择 报错

tdesign-starter-cli 版本

v0.3.2

重现链接

No response

重现步骤

✔ 构建环境正常!

? 请输入项目名称: aa
? 请输入项目描述: Base on tdesign-starter-cli
? 选择模板类型: 【Vue3】模板
? 生成代码版本: 通用模板版本
? 选择包含模块: 自定义选择

期望结果

No response

实际结果

TypeError: Cannot read properties of undefined (reading 'replace')
at e.generateSourceModulesData (C:\Users\LI\AppData\Roaming\npm\node_modules\tdesign-starter-cli\bin\index.js:2:11248)
at e.parseConfigSourceVue3 (C:\Users\LI\AppData\Roaming\npm\node_modules\tdesign-starter-cli\bin\index.js:2:26617)
at e. (C:\Users\LI\AppData\Roaming\npm\node_modules\tdesign-starter-cli\bin\index.js:2:24821)
at step (C:\Users\LI\AppData\Roaming\npm\node_modules\tdesign-starter-cli\node_modules\tslib\tslib.js:143:27)
at Object.next (C:\Users\LI\AppData\Roaming\npm\node_modules\tdesign-starter-cli\node_modules\tslib\tslib.js:124:57)
at fulfilled (C:\Users\LI\AppData\Roaming\npm\node_modules\tdesign-starter-cli\node_modules\tslib\tslib.js:114:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

框架版本

No response

浏览器版本

No response

系统版本

win11

Node版本

v18.14.0

补充说明

No response

脚手架初始化项目失败

tdesign-vue-next-starter 版本

v0.2.4

重现链接

No response

重现步骤

1,td-starter init
2,
?请输入项目名称: view
? 请输入项目描述: test
? 选择模板类型: 【Vue3】模板

期望结果

构建成功

实际结果

D:\work\packtool>td-starter init



|_ | | _ \ ___ ___ () __ _ _ __ / | | | __ _ _ __ | | ___ _ __
| | | | | | / _ \ / | | | / _ | | '_ \ \___ \ | __| / _ | | '| | | / _ \ | '|
| | | |
| | | / _ \ | | | (| | | | | | ) | | | | (| | | | | | | __/ | |
|
| |____/ _
| |/ || _, | || || |/ _| _,| || _| ___| ||
|___/


√ 构建环境正常!

? 请输入项目名称: view
? 请输入项目描述: Base on tdesign-starter-cli
? 选择模板类型: 【Vue3】模板
? 选择包含模块: 全部

👉 开始构建,请稍侯...

| 正在构建模板...
√ 构建成功!
write file error== Error: ENOENT: no such file or directory, open 'view\package.json'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at e.executeBuildSuccess (C:\Users\Administrator\AppData\Roaming\npm\node_modules\tdesign-starter-cli\bin\index.js:2:29053)
at e. (C:\Users\Administrator\AppData\Roaming\npm\node_modules\tdesign-starter-cli\bin\index.js:2:28474)
at step (C:\Users\Administrator\AppData\Roaming\npm\node_modules\tdesign-starter-cli\node_modules\tslib\tslib.js:143:27)
at Object.next (C:\Users\Administrator\AppData\Roaming\npm\node_modules\tdesign-starter-cli\node_modules\tslib\tslib.js:124:57)
at fulfilled (C:\Users\Administrator\AppData\Roaming\npm\node_modules\tdesign-starter-cli\node_modules\tslib\tslib.js:114:62)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errno: -4058,
syscall: 'open',
code: 'ENOENT',
path: 'view\package.json'
}

👏 初始化项目完成!👏

命令提示:

进入项目

$ cd ./view

安装依赖

$ npm install

运行

$ npm run dev

框架版本

No response

浏览器版本

No response

系统版本

Windows 11 21H2

Node版本

v16.13.1

补充说明

No response

错误信息: RequestError: read ECONNRESET

Describe Environment
Chrome: 版本 97.0.4692.99(正式版本) (64 位)

Describe the bug
构建项目时提示错误信息: RequestError: read ECONNRESET

Additional context
ff76de010f4f4bd8bb6229f81fb1509

是否提供简洁的模板呢?

tdesign-starter-cli 版本

最新

重现链接

No response

重现步骤

是否提供简洁的模板呢?

期望结果

是否提供简洁的模板呢?

实际结果

是否提供简洁的模板呢?

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

用户反馈:Error: Client network socket disconnected

重现步骤

td-starter init

wecom-temp-96d17818ab228ec5125ad25a163abee4

期望结果

请求成功

实际结果

请求失败

补充说明

挂了panda vpn

Environment Info
相关版本 0.1.0
框架版本 / 基础库版本 无关
系统、浏览器 MacOS
Node版本 14.17.0

[td-starter init] 使用td-starter初始化项目时,首页样式不正确

tdesign-vue 版本

0.49.0

重现链接

No response

重现步骤

使用文档的td-starter init脚手架新建初始化项目启动后,访问首页和再官网预览的结果不一致

期望结果

使用td-starter init初始化后项目启动后希望和官网预览的那个是一致的

实际结果

使用td-starter init初始化启动项目后的首页
首页图片
官网上面看到的预览首页
官网图片

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

CLI待新增功能

  • 1.新增选项,支持用户按需求下载不同的功能页面
  • 2.新增选项,支持选择TS/JS版本,前置依赖仓库生成纯JS的分支 refer to #16
  • 3.支持React版本选项,前置依赖React版本Starter开发完成
  • 4.在以上功能支持后 支持init -y的快捷选项 refer to #8

td-starter init 错误

tdesign 版本

最新版

重现链接

No response

重现步骤

✔ 构建环境正常!

? 请输入项目名称: IMIS.SSO.UI
? 请输入项目描述: Base on tdesign-starter-cli
? 选择模板类型: PC【Vue3】模板
? 生成代码版本: 通用模板版本
? 选择包含模块: 自定义选择
? 选择您需要生成的模块内容

👉 开始构建,请稍侯...

✖ ❗错误:下载模板失败
❗错误信息: Error: end of central directory record signature not found
❗请尝试执行:git clone https://github.com/Tencent/tdesign-vue-next-starter.git 使用
executeDownload error == Error: end of central directory record signature not found
at D:\Program Files\nodejs\node_global\node_modules\tdesign-starter-cli\node_modules.store\[email protected]\node_modules\yauzl\index.js:187:14
at D:\Program Files\nodejs\node_global\node_modules\tdesign-starter-cli\node_modules.store\[email protected]\node_modules\yauzl\index.js:631:5
at Immediate. (D:\Program Files\nodejs\node_global\node_modules\tdesign-starter-cli\node_modules.store\[email protected]\node_modules\fd-slicer\index.js:202:5)
at process.processImmediate (node:internal/timers:476:21)
td-starter-init错误

期望结果

正常安装

实际结果

安装失败

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

执行脚手架init报错

tdesign-vue-starter 版本

0.4.1

重现链接

No response

重现步骤

安装tdesign-starter-cli后创建项目td-starter init抛出异常
image

期望结果

No response

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

win10

Node版本

14.21.3

补充说明

No response

git init后,npm install报错

tdesign-starter-cli 版本

0.3.1

重现链接

packageContent.scripts.prepare = "node -e \"if(require('fs').existsSync('.git')){process.exit(1)}\" || is-ci || husky install";

重现步骤

git init后,npm install 会报 'is-ci' 不是内部或外部命令,也不是可运行的程序

期望结果

No response

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

初始化Lite版本 新增支持webpack版本支持

这个功能解决了什么问题

目前lite版本默认使用vite 希望新增webpack版本的支持 满足用户不同的需求

你建议的方案是什么

在templates中新增模板代码 支持webpack版本的模板生成

[td-starter] 自定义创建项目时(列表页、详情页、表单页图标有问题)

tdesign-vue-starter 版本

0.2.2

重现步骤

td-starter init

初始化项目之后components.ts中的图标使用有点问题,应该是"icon": ViewModuleIcon,生成代码"icon": "ViewModuleIcon"

期望结果

import { ViewModuleIcon, Edit1Icon, LayersIcon } from 'tdesign-icons-vue';
{
    ...
    "meta": {
		"title": "列表页",
		"icon": ViewModuleIcon
    },
}

实际结果

import { ViewModuleIcon, Edit1Icon, LayersIcon } from 'tdesign-icons-vue';
{
    ...
    "meta": {
		"title": "列表页",
		"icon": "ViewModuleIcon"
    },
}

[cli] 生成的lite版模板没有".gitignore"文件

tdesign-starter-cli 版本

0.3.3

重现链接

无需链接即可重现

重现步骤

执行命令

td-starter init

按步骤生成lite模板

? 请输入项目名称: test2
? 请输入项目描述: Base on tdesign-starter-cli
? 选择模板类型: (Use arrow keys)
❯ 【Vue2】模板 
? 生成代码版本: (Use arrow keys)
❯  Lite版本 (只包含TDesign的基本使用和项目工程)
? 请选择构建工具 (Use arrow keys)
❯  vite

生成模板成功

👉  开始构建,请稍侯...

⠋ 正在构建模板...👉  生成代码完毕...

✔ 构建成功!

👏 初始化项目完成!👏

打开模板地址,没有.gitignore文件

cd test2 && ls -a 
# .		README.md	index.html	public		vite.config.js
# ..		assets		package.json	src

期望结果

生成的lite模板含有.gitignore文件

实际结果

模板没有.gitignore文件。.gitignore文件非常重要,没有此文件可能导致不注意时上传了node_modules或者其他文件。

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

16.20.0

补充说明

根据npm官网文档.gitignore文件会被忽略发布,需要特殊配置

原文信息:
Files included in package
To see what will be included in your package, run npm pack --dry-run. All files are included by default, with the following exceptions:

Certain files that are relevant to package installation and distribution are always included. For example, package.json, README.md, LICENSE, and so on.

If there is a "files" list in package.json, then only the files specified will be included. (If directories are specified, then they will be walked recursively and their contents included, subject to the same ignore rules.)

If there is a .gitignore or .npmignore file, then ignored files in that and all child directories will be excluded from the package. If both files exist, then the .gitignore is ignored, and only the .npmignore is used.

.npmignore files follow the same pattern rules as .gitignore files

If the file matches certain patterns, then it will never be included, unless explicitly added to the "files" list in package.json, or un-ignored with a ! rule in a .npmignore or .gitignore file.

Symbolic links are never included in npm packages.

See developers for full details on what's included in the published package, as well as details on how the package is built.

新增命令td-starter init -y

Is your feature request related to a problem? Please describe.
Like the command npm init -y to initialize the project

Describe the solution you'd like
you can directly create the project with the command td-starter init -y. The user does not have to enter too many configurations

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.