ljr-cli 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/lib/demo1.js +36 -0
  2. package/lib/demo2.js +85 -0
  3. package/lib/index.js +183 -14
  4. package/lib/templates/flutter//346/210/221/346/230/257flutter.txt +0 -0
  5. package/lib/templates/java//346/210/221/346/230/257java.txt +0 -0
  6. package/lib/templates/monorepo//346/210/221/346/230/257monorepo.txt +0 -0
  7. package/lib/templates/mysql//346/210/221/346/230/257mysql.txt +0 -0
  8. package/lib/templates/node//346/210/221/346/230/257node.txt +0 -0
  9. package/lib/templates/qiankun//346/210/221/346/230/257qiankun.txt +0 -0
  10. package/lib/templates/react//346/210/221/346/230/257react.txt +0 -0
  11. package/lib/templates/uni-app//346/210/221/346/230/257uni-app.txt +0 -0
  12. package/lib/templates/vue2.7.16/.browserslistrc +3 -0
  13. package/lib/templates/vue2.7.16/.env +4 -0
  14. package/lib/templates/vue2.7.16/.env.development +7 -0
  15. package/lib/templates/vue2.7.16/.env.production +7 -0
  16. package/lib/templates/vue2.7.16/.eslintignore +3 -0
  17. package/lib/templates/vue2.7.16/.eslintrc.js +21 -0
  18. package/lib/templates/vue2.7.16/.prettierrc.js +11 -0
  19. package/lib/templates/vue2.7.16/.vscode/settings.json +10 -0
  20. package/lib/templates/vue2.7.16/README.md +55 -0
  21. package/lib/templates/vue2.7.16/babel.config.js +3 -0
  22. package/lib/templates/vue2.7.16/jsconfig.json +19 -0
  23. package/lib/templates/vue2.7.16/package-lock.json +12422 -0
  24. package/lib/templates/vue2.7.16/package.json +37 -0
  25. package/lib/templates/vue2.7.16/public/favicon.svg +14 -0
  26. package/lib/templates/vue2.7.16/public/index.html +20 -0
  27. package/lib/templates/vue2.7.16/src/App.vue +14 -0
  28. package/lib/templates/vue2.7.16/src/api/interface/index.js +6 -0
  29. package/lib/templates/vue2.7.16/src/api/request.js +121 -0
  30. package/lib/templates/vue2.7.16/src/api/server/index.js +6 -0
  31. package/lib/templates/vue2.7.16/src/assets/logo.png +0 -0
  32. package/lib/templates/vue2.7.16/src/components/README.md +5 -0
  33. package/lib/templates/vue2.7.16/src/components/baseInfo/index.vue +29 -0
  34. package/lib/templates/vue2.7.16/src/components/baseInfo/item.vue +64 -0
  35. package/lib/templates/vue2.7.16/src/components/index.js +14 -0
  36. package/lib/templates/vue2.7.16/src/components/layout/left-menu-and-top-info.vue +121 -0
  37. package/lib/templates/vue2.7.16/src/components/pagination/index.vue +52 -0
  38. package/lib/templates/vue2.7.16/src/css/coverage-style.css +6 -0
  39. package/lib/templates/vue2.7.16/src/directive/index.js +16 -0
  40. package/lib/templates/vue2.7.16/src/directive/input-number.js +18 -0
  41. package/lib/templates/vue2.7.16/src/directive/permission.js +52 -0
  42. package/lib/templates/vue2.7.16/src/directive/re-click.js +12 -0
  43. package/lib/templates/vue2.7.16/src/global-config.js +12 -0
  44. package/lib/templates/vue2.7.16/src/main.js +79 -0
  45. package/lib/templates/vue2.7.16/src/prototype/README.md +1 -0
  46. package/lib/templates/vue2.7.16/src/prototype/el-dialog.js +127 -0
  47. package/lib/templates/vue2.7.16/src/prototype/index.js +53 -0
  48. package/lib/templates/vue2.7.16/src/router/index.js +257 -0
  49. package/lib/templates/vue2.7.16/src/store/index.js +50 -0
  50. package/lib/templates/vue2.7.16/src/store/modules/dd.js +128 -0
  51. package/lib/templates/vue2.7.16/src/store/modules/permissions.js +24 -0
  52. package/lib/templates/vue2.7.16/src/views/404.vue +7 -0
  53. package/lib/templates/vue2.7.16/src/views/Pitfalls//345/206/205/345/255/230/346/272/242/345/207/272/index.vue +56 -0
  54. package/lib/templates/vue2.7.16/src/views/Pitfalls//345/206/205/345/255/230/346/272/242/345/207/272//351/200/240/346/210/220vue2/345/206/205/345/255/230/346/272/242/345/207/272/347/232/204/345/257/271/350/261/241.js +33518 -0
  55. package/lib/templates/vue2.7.16/src/views/about.vue +5 -0
  56. package/lib/templates/vue2.7.16/src/views/demo//345/205/250/345/261/200store/346/225/260/346/215/256/345/255/227/345/205/270/index.vue +85 -0
  57. package/lib/templates/vue2.7.16/src/views/demo//345/205/250/345/261/200/345/274/271/347/252/227/ce.vue +42 -0
  58. package/lib/templates/vue2.7.16/src/views/demo//345/205/250/345/261/200/345/274/271/347/252/227/index.vue +24 -0
  59. package/lib/templates/vue2.7.16/src/views/demo//345/205/250/345/261/200/346/214/207/344/273/244/index.vue +78 -0
  60. package/lib/templates/vue2.7.16/src/views/demo//350/257/267/346/261/202/347/244/272/344/276/213/index.vue +51 -0
  61. package/lib/templates/vue2.7.16/src/views/home.vue +3 -0
  62. package/lib/templates/vue2.7.16/src/views/login.vue +67 -0
  63. package/lib/templates/vue2.7.16/src/views/template/base-info.vue +29 -0
  64. package/lib/templates/vue2.7.16/src/views/template/base-info2.vue +56 -0
  65. package/lib/templates/vue2.7.16/src/views/template/list/ce.vue +58 -0
  66. package/lib/templates/vue2.7.16/src/views/template/list/index.vue +111 -0
  67. package/lib/templates/vue2.7.16/src/views/template/list/search.vue +60 -0
  68. package/lib/templates/vue2.7.16/vue.config.js +26 -0
  69. package/lib/templates/vue3.5.25-2025.12.4/.editorconfig +8 -0
  70. package/lib/templates/vue3.5.25-2025.12.4/.gitattributes +1 -0
  71. package/lib/templates/vue3.5.25-2025.12.4/.prettierrc.json +11 -0
  72. package/lib/templates/vue3.5.25-2025.12.4/.vscode/extensions.json +8 -0
  73. package/lib/templates/vue3.5.25-2025.12.4/.vscode/settings.json +13 -0
  74. package/lib/templates/vue3.5.25-2025.12.4/README.md +75 -0
  75. package/lib/templates/vue3.5.25-2025.12.4/env.d.ts +1 -0
  76. package/lib/templates/vue3.5.25-2025.12.4/eslint.config.ts +32 -0
  77. package/lib/templates/vue3.5.25-2025.12.4/index.html +13 -0
  78. package/lib/templates/vue3.5.25-2025.12.4/package-lock.json +5297 -0
  79. package/lib/templates/vue3.5.25-2025.12.4/package.json +44 -0
  80. package/lib/templates/vue3.5.25-2025.12.4/public/favicon.svg +14 -0
  81. package/lib/templates/vue3.5.25-2025.12.4/src/App.vue +16 -0
  82. package/lib/templates/vue3.5.25-2025.12.4/src/assets/vue.svg +1 -0
  83. package/lib/templates/vue3.5.25-2025.12.4/src/boot/element-plus.ts +13 -0
  84. package/lib/templates/vue3.5.25-2025.12.4/src/boot/index.ts +16 -0
  85. package/lib/templates/vue3.5.25-2025.12.4/src/boot/pinia.ts +10 -0
  86. package/lib/templates/vue3.5.25-2025.12.4/src/boot/router.ts +10 -0
  87. package/lib/templates/vue3.5.25-2025.12.4/src/boot/style.ts +9 -0
  88. package/lib/templates/vue3.5.25-2025.12.4/src/css/coverage-style.css +6 -0
  89. package/lib/templates/vue3.5.25-2025.12.4/src/directive/index.js +8 -0
  90. package/lib/templates/vue3.5.25-2025.12.4/src/directive/rememberScrollPosition.ts +17 -0
  91. package/lib/templates/vue3.5.25-2025.12.4/src/main.ts +8 -0
  92. package/lib/templates/vue3.5.25-2025.12.4/src/router/index.ts +20 -0
  93. package/lib/templates/vue3.5.25-2025.12.4/src/stores/counter.ts +12 -0
  94. package/lib/templates/vue3.5.25-2025.12.4/src/views/AboutView.vue +3 -0
  95. package/lib/templates/vue3.5.25-2025.12.4/src/views/HomeView.vue +8 -0
  96. package/lib/templates/vue3.5.25-2025.12.4/tsconfig.app.json +13 -0
  97. package/lib/templates/vue3.5.25-2025.12.4/tsconfig.json +11 -0
  98. package/lib/templates/vue3.5.25-2025.12.4/tsconfig.node.json +19 -0
  99. package/lib/templates/vue3.5.25-2025.12.4/vite.config.ts +17 -0
  100. package/lib/templates/wx-miniapp//346/210/221/346/230/257wx-miniapp.txt +0 -0
  101. package/lib/utils/date.js +148 -0
  102. package/package.json +11 -3
@@ -0,0 +1,26 @@
1
+ const { defineConfig } = require("@vue/cli-service")
2
+ module.exports = defineConfig({
3
+ transpileDependencies: true,
4
+ publicPath: "./", // 公共路径
5
+ devServer: {
6
+ open: false, // 是否直接打开默认游览器
7
+ // 关闭开发服务器的错误覆盖层
8
+ client: {
9
+ overlay: false, // 或者设置为一个包含特定选项的对象
10
+ // 例如,只想禁用警告 overlay: { warnings: false, errors: true }
11
+ // overlay: {
12
+ // warnings: false, // 禁用警告信息的覆盖层
13
+ // errors: false // 禁用错误信息的覆盖层
14
+ // }
15
+ },
16
+ // 代理
17
+ proxy: {
18
+ [process.env.VUE_APP_BASE_API]: {
19
+ // target: "http://www.xxx.com", // 代理地址
20
+ target: "https://m1.apifoxmock.com/m1/4319632-3962606-default", // 自己的 apifox mock 地址
21
+ // target: "http://localhost:9001", // 自己的 node 地址
22
+ pathRewrite: { "^/dev-api": "" }, // 重写路径
23
+ },
24
+ },
25
+ },
26
+ })
@@ -0,0 +1,8 @@
1
+ [*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
2
+ charset = utf-8
3
+ indent_size = 2
4
+ indent_style = space
5
+ insert_final_newline = true
6
+ trim_trailing_whitespace = true
7
+ end_of_line = lf
8
+ max_line_length = 100
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/prettierrc",
3
+ "printWidth": 120,
4
+ "semi": false,
5
+ "tabWidth": 2,
6
+ "useTabs": false,
7
+ "singleQuote": false,
8
+ "trailingComma": "all",
9
+ "bracketSpacing": true,
10
+ "endOfLine": "auto"
11
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "recommendations": [
3
+ "Vue.volar",
4
+ "dbaeumer.vscode-eslint",
5
+ "EditorConfig.EditorConfig",
6
+ "esbenp.prettier-vscode"
7
+ ]
8
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "explorer.fileNesting.enabled": true,
3
+ "explorer.fileNesting.patterns": {
4
+ "tsconfig.json": "tsconfig.*.json, env.d.ts",
5
+ "vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
6
+ "package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .prettier*, prettier*, .editorconfig"
7
+ },
8
+ "editor.codeActionsOnSave": {
9
+ "source.fixAll": "explicit"
10
+ },
11
+ "editor.formatOnSave": true,
12
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
13
+ }
@@ -0,0 +1,75 @@
1
+ # vue3.5.25模版
2
+
3
+ 2025.12.4创建的模版
4
+ 引入 l-global 包,包括 variable.css、base.css、global.css 和 utils 工具类
5
+
6
+ 引入 element-plus,并加入类型提示
7
+ 做了登录页,404 页
8
+ 做了通过路由配置生成左侧菜单
9
+ 使用 vuex-persist 插件做 vuex 持久化
10
+ 封装了全局登录判断的路由卫士
11
+ eslint + prettier
12
+ axios 封装
13
+ 封装自定义指令
14
+ 封装自动注册全局组件
15
+ 封装函数式弹窗
16
+ 封装 store 的数据字典
17
+ 原型扩展
18
+ 收集一些模版
19
+ 收集一些遇到的问题
20
+ 收集一些动画
21
+ 列表的模版,顶部搜索,中间表格,底下分页,新建编辑弹窗,删除二次确认模版
22
+
23
+ # 目录
24
+
25
+ ```
26
+ ├── assets # 静态资源
27
+ ├── components # 组件
28
+ ├── css # css
29
+ ├── router # 路由
30
+ ├── stores # stores
31
+ ├── views # 页面
32
+ ├── package.json
33
+ ├── package-lock.json
34
+ ```
35
+
36
+ ## 初始化
37
+
38
+ ```sh
39
+ npm install
40
+ ```
41
+
42
+ ### 编译和热重载开发
43
+
44
+ ```sh
45
+ npm run dev || npm run serve
46
+ ```
47
+
48
+ ### 为生产进行类型检查、编译和最小化
49
+
50
+ ```sh
51
+ npm run build
52
+ ```
53
+
54
+ ### eslint检查
55
+
56
+ ```sh
57
+ npm run lint
58
+ ```
59
+
60
+ ### prettier格式化
61
+
62
+ ```sh
63
+ npm run format
64
+ ```
65
+
66
+ ### 命名规范
67
+
68
+ | 类别 | 推荐命名方式 | 示例 | 关键点/例外情况 |
69
+ | ------------------ | ----------------------------------------------- | ----------------- | ---------------------- |
70
+ | 通用 | kebab-case | package-lock.json | 没有特别说明尽量用这个 |
71
+ | 变量 | camelCase | userProfile | |
72
+ | 路由名称 | camelCase 或者 PascalCase | userProfile | |
73
+ | App.vue | PascalCase | | |
74
+ | Vue 组件里的组件名 | PascalCase | | |
75
+ | Vue 组件里的 Props | 在声明时使用 camelCase,在模板中使用 kebab-case | | |
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,32 @@
1
+ import { globalIgnores } from "eslint/config"
2
+ import { defineConfigWithVueTs, vueTsConfigs } from "@vue/eslint-config-typescript"
3
+ import pluginVue from "eslint-plugin-vue"
4
+ import skipFormatting from "@vue/eslint-config-prettier/skip-formatting"
5
+
6
+ // To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
7
+ // import { configureVueProject } from '@vue/eslint-config-typescript'
8
+ // configureVueProject({ scriptLangs: ['ts', 'tsx'] })
9
+ // More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
10
+
11
+ export default defineConfigWithVueTs(
12
+ {
13
+ name: "app/files-to-lint",
14
+ files: ["**/*.{ts,mts,tsx,vue}"],
15
+ },
16
+
17
+ globalIgnores(["**/dist/**", "**/dist-ssr/**", "**/coverage/**"]),
18
+
19
+ pluginVue.configs["flat/essential"],
20
+ vueTsConfigs.recommended,
21
+ skipFormatting,
22
+ {
23
+ rules: {
24
+ "no-unused-vars": ["off", { vars: "all", args: "none" }], // 有没有未使用的变量
25
+ "@typescript-eslint/no-unused-vars": "off",
26
+ "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", // console是否要警告
27
+ "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", // debugger是否要警告
28
+ "spaced-comment": ["error", "always", { markers: ["/"] }], // 注释 // 或 /* 开始后的间距的一致性
29
+ "vue/attributes-order": "error", // vue属性排序
30
+ },
31
+ },
32
+ )
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="shortcut icon" type="image/svg" href="/favicon.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>vue3.5.25模版</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>