0.3.5 • Published 1 month ago

create-vite-w-cli v0.3.5

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

下阶段计划

暂无

bug 修复

2024-04-01
  1. 修复 eslint 中, prettier的错误
2024-03-08
  1. 删除 TypeScript Vue Plugin (Volar) 的工作区建议, 现在使用 Vue -Official
2024-02-06
  1. vite-plugin-svg-icons@2.0.1 去除, 因为关联的几个依赖已经废弃
  2. vite更新到 5.0.11 , 同时添加 node20 到开发依赖
  3. vue 更新到 3.4.15
  4. 添加jsx支持
2024-01-05
  1. 修复了文件拷贝的错误
  2. 修复了 @vueuse/motion 没有添加到 package.json 的错误
  1. eslint 配置中,没选择prettier 却错误添加相关配置的问题
  2. 2023-09-25 修复了 .vscode 中的错误引号, 生成的 request 文件中的拦截器错误
  3. 2023-11-06 修复了使用 cnpm 安装时, @element-plus/icons-vue 没有一起安装导致的错误

更新说明

2024-02-18
  1. 添加 gzip 压缩
2024-01-19

1.添加代理

2024-01-09
  1. 集成 ckeditor
  2. 集成 codemirror
2024-01-05
  1. 集成 vite-plugin-svg-icons
  2. 集成 @vueuse/motion
  3. 集成 .env变量
  4. 集成 public/config 打包后可以快速修改接口配置
  5. 集成加密工具
  6. 集成 leaflet 地图
  1. 添加命令行参数 用于在 node 服务中直接使用命令行参数来快捷生成, (网页 -> node 服务 -> 调用它),可选配置有

    export interface answersType {
    	'project-name': string
    	'w-template': 'vite-vue3' | 'vite-all' | 'vite-all-mock'
    	'w-ui': 'none' | 'element-plus' | 'tdesign'
    	'is-ts': boolean
    	'is-sass': boolean
    	'is-eslint': boolean
    	'is-prettier': boolean
    	'is-taillwind': boolean
    	'is-permission': boolean
        'is-leaflet' : boolean
    }
    
    //默认
    const answers: answersType = {
    	'project-name': 'my-project',
    	'w-template': 'vite-vue3',
    	'w-ui': 'none',
    	'is-ts': true,
    	'is-sass': true,
    	'is-eslint': true,
    	'is-prettier': false,
    	'is-taillwind': true,
    	'is-permission': false,
        'is-leaflet' : false
    }

说明

  1. 用于生成 vite + vue3 的基础模板

  2. 可选配置有

    typescript , sass , taillwind , eslint

    element-plus , tdesign

    axios , mock , pinia , mitt , vue-router

  3. 工具尚未经过完整测试

使用

  1. npm create vite-w-cli 选择配置即可

  2. 或者 npm i create-vite-w-cli 之后, 运行npx create-vite-w-cli

示例

测试版工具,版本号: 0.1.0

? 搞个啥项目名啊? test-create
? 搞个啥模板啊? 干干净净,想要什么自己装
? 搞个啥ui框架啊? tdesign(腾讯)
? 是否使用TypeScript? Yes
? 是否使用Sass? Yes
? 是否使用Tailwind? Yes
? 是否使用ESLint(changelog,commitizen 会一起添加)? Yes
? 是否使用Prettier? No
? 是否预置权限控制? No
✔ 完活!

现在可以运行 : cd test-create
然后安装依赖 : npm i

已选择eslint规则, 需同步安装配置husky:
  首先: npx husky install
  然后: npx husky add .husky/pre-commit "npx lint-staged"

注意,如果你换了环境也需要重新配置husky

最后运行项目 : npm run dev

常见问题

  1. 如果 npm create vite-w-cli 使用了旧的版本, 应该是npm缓存导致 可以使用以下命令来清理:
        npm cache clean --force
    或者:
        npm config get cache # 查看缓存目录
        # 之后删除`_npx`下的文件
0.3.5

1 month ago

0.3.4

2 months ago

0.3.3

3 months ago

0.3.2

3 months ago

0.3.1

3 months ago

0.3.0

4 months ago

0.2.9

4 months ago

0.2.8

4 months ago

0.2.7

4 months ago

0.2.6

4 months ago

0.2.5

4 months ago

0.2.4

4 months ago

0.2.3

4 months ago

0.2.2

4 months ago

0.2.1

4 months ago

0.2.0

6 months ago

0.1.7

6 months ago

0.1.6

6 months ago

0.1.5

6 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago