@gx-design-vue/create-gx-cli 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/package.json +1 -1
  2. package/src/main.js +9 -3
  3. package/template-mobile-vant-cli/.editorconfig +0 -19
  4. package/template-mobile-vant-cli/.env.development +0 -19
  5. package/template-mobile-vant-cli/.env.pro +0 -19
  6. package/template-mobile-vant-cli/.env.production +0 -19
  7. package/template-mobile-vant-cli/.eslintignore +0 -16
  8. package/template-mobile-vant-cli/.eslintrc.js +0 -64
  9. package/template-mobile-vant-cli/.prettierignore +0 -9
  10. package/template-mobile-vant-cli/.stylelintignore +0 -3
  11. package/template-mobile-vant-cli/build/cdn.ts +0 -5
  12. package/template-mobile-vant-cli/build/generateModifyVars.ts +0 -7
  13. package/template-mobile-vant-cli/build/optimizer.ts +0 -18
  14. package/template-mobile-vant-cli/build/plugin/autoImport.ts +0 -26
  15. package/template-mobile-vant-cli/build/plugin/html.ts +0 -26
  16. package/template-mobile-vant-cli/build/plugin/index.ts +0 -50
  17. package/template-mobile-vant-cli/build/plugin/mock.ts +0 -20
  18. package/template-mobile-vant-cli/build/script/postBuild.ts +0 -14
  19. package/template-mobile-vant-cli/index.html +0 -24
  20. package/template-mobile-vant-cli/mock/_createProductionServer.ts +0 -19
  21. package/template-mobile-vant-cli/mock/api/index.ts +0 -66
  22. package/template-mobile-vant-cli/mock/utils.ts +0 -9
  23. package/template-mobile-vant-cli/package.json +0 -64
  24. package/template-mobile-vant-cli/postcss.config.js +0 -8
  25. package/template-mobile-vant-cli/prettier.config.js +0 -18
  26. package/template-mobile-vant-cli/public/favicon.ico +0 -0
  27. package/template-mobile-vant-cli/public/js/flexible.js +0 -44
  28. package/template-mobile-vant-cli/src/App.vue +0 -5
  29. package/template-mobile-vant-cli/src/components/PageContainer/ProSkeleton.tsx +0 -30
  30. package/template-mobile-vant-cli/src/components/PageContainer/index.tsx +0 -114
  31. package/template-mobile-vant-cli/src/components/PageContainer/style.module.less +0 -14
  32. package/template-mobile-vant-cli/src/core/gx-design/index.ts +0 -7
  33. package/template-mobile-vant-cli/src/core/index.ts +0 -12
  34. package/template-mobile-vant-cli/src/core/vant-design/index.ts +0 -4
  35. package/template-mobile-vant-cli/src/design/config.less +0 -0
  36. package/template-mobile-vant-cli/src/design/index.less +0 -3
  37. package/template-mobile-vant-cli/src/design/reset.less +0 -155
  38. package/template-mobile-vant-cli/src/design/root.less +0 -3
  39. package/template-mobile-vant-cli/src/design/vant.less +0 -2
  40. package/template-mobile-vant-cli/src/global.less +0 -1
  41. package/template-mobile-vant-cli/src/hooks/web/index.ts +0 -5
  42. package/template-mobile-vant-cli/src/hooks/web/usePageLoading.ts +0 -55
  43. package/template-mobile-vant-cli/src/layout/BasicLayout.vue +0 -16
  44. package/template-mobile-vant-cli/src/layout/basicLayout.less +0 -11
  45. package/template-mobile-vant-cli/src/main.ts +0 -27
  46. package/template-mobile-vant-cli/src/pages/home.vue +0 -71
  47. package/template-mobile-vant-cli/src/router/index.ts +0 -24
  48. package/template-mobile-vant-cli/src/router/routes.ts +0 -20
  49. package/template-mobile-vant-cli/src/router/typings.ts +0 -8
  50. package/template-mobile-vant-cli/src/services/index.ts +0 -31
  51. package/template-mobile-vant-cli/src/settings/index.ts +0 -10
  52. package/template-mobile-vant-cli/src/store/index.ts +0 -17
  53. package/template-mobile-vant-cli/src/store/modules/global.ts +0 -30
  54. package/template-mobile-vant-cli/src/utils/cryptoJS.ts +0 -39
  55. package/template-mobile-vant-cli/src/utils/env.ts +0 -52
  56. package/template-mobile-vant-cli/src/utils/pageTitle.ts +0 -12
  57. package/template-mobile-vant-cli/src/utils/request/XHR.ts +0 -131
  58. package/template-mobile-vant-cli/src/utils/request/axiosCancel.ts +0 -60
  59. package/template-mobile-vant-cli/src/utils/request/checkStatus.ts +0 -11
  60. package/template-mobile-vant-cli/src/utils/request/index.ts +0 -143
  61. package/template-mobile-vant-cli/src/utils/request/typings.ts +0 -114
  62. package/template-mobile-vant-cli/src/utils/storage.ts +0 -191
  63. package/template-mobile-vant-cli/src/utils/util.ts +0 -32
  64. package/template-mobile-vant-cli/src/utils/validate.ts +0 -28
  65. package/template-mobile-vant-cli/stylelint.config.js +0 -106
  66. package/template-mobile-vant-cli/tsconfig.json +0 -43
  67. package/template-mobile-vant-cli/types/auto-imports.d.ts +0 -61
  68. package/template-mobile-vant-cli/types/components.d.ts +0 -15
  69. package/template-mobile-vant-cli/types/global.d.ts +0 -36
  70. package/template-mobile-vant-cli/types/gx-components.d.ts +0 -13
  71. package/template-mobile-vant-cli/types/module.d.ts +0 -7
  72. package/template-mobile-vant-cli/types/response.d.ts +0 -12
  73. package/template-mobile-vant-cli/vite.config.ts +0 -113
  74. package/template-mobile-vant-html/css/global.css +0 -293
  75. package/template-mobile-vant-html/css/global.css.map +0 -1
  76. package/template-mobile-vant-html/css/global.less +0 -293
  77. package/template-mobile-vant-html/css/index.css +0 -20
  78. package/template-mobile-vant-html/css/index.css.map +0 -1
  79. package/template-mobile-vant-html/css/index.less +0 -21
  80. package/template-mobile-vant-html/image/disconnected.svg +0 -60
  81. package/template-mobile-vant-html/image/empty.svg +0 -52
  82. package/template-mobile-vant-html/image/error.svg +0 -53
  83. package/template-mobile-vant-html/image/loading.svg +0 -1
  84. package/template-mobile-vant-html/index.html +0 -91
  85. package/template-mobile-vant-html/js/index.js +0 -29
  86. package/template-mobile-vant-html/js/plugin/day.min.js +0 -1
  87. package/template-mobile-vant-html/js/plugin/fastclick.js +0 -730
  88. package/template-mobile-vant-html/js/plugin/jquery.min.js +0 -2
  89. package/template-mobile-vant-html/js/plugin/rem.js +0 -28
  90. package/template-mobile-vant-html/js/utils/appUtil.js +0 -70
  91. package/template-mobile-vant-html/js/utils/config.js +0 -3
  92. package/template-mobile-vant-html/js/utils/request.js +0 -61
  93. package/template-mobile-vant-html/js/utils/utils.js +0 -65
  94. package/template-mobile-vant-html/js/utils/validate.js +0 -292
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gx-design-vue/create-gx-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "license": "MIT",
5
5
  "description": "a cli to bootstrap gx project",
6
6
  "main": "src/index.js",
package/src/main.js CHANGED
@@ -13,7 +13,7 @@ const copy = promisify(ncp)
13
13
  const gitRepositoryList = [
14
14
  {
15
15
  name: 'gx-design-pro',
16
- git: 'https://gitee.com/gx12358/vue-antd-admin.git#v2'
16
+ git: 'https://gitee.com/gx12358/vue3-antd-admin.git'
17
17
  },
18
18
  {
19
19
  name: 'gx-design-thin',
@@ -22,8 +22,15 @@ const gitRepositoryList = [
22
22
  ]
23
23
 
24
24
  async function copyTemplateFiles(templateDir, root) {
25
+ const exclusions = [ 'node_modules' ]
25
26
  return copy(templateDir, root, {
26
- clobber: false
27
+ clobber: false,
28
+ filter: (sourcePath) => {
29
+ const relativePath = path.relative(templateDir, sourcePath);
30
+ const folders = relativePath.split(path.sep);
31
+ const folderToCheck = folders.length > 1 ? folders[1] : folders[0];
32
+ return !exclusions.includes(folderToCheck)
33
+ }
27
34
  })
28
35
  }
29
36
 
@@ -49,7 +56,6 @@ function editPackageJson(root, projectName) {
49
56
  writeFile(path.join(root, '.npmrc'), 'shamefully-hoist=true')
50
57
  }
51
58
 
52
-
53
59
  writeFile(path.join(root, 'package.json'), JSON.stringify(pkg, null, 2))
54
60
  }
55
61
  }
@@ -1,19 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- charset=utf-8
5
- end_of_line=lf
6
- insert_final_newline=true
7
- indent_style=space
8
- indent_size=2
9
- max_line_length = 100
10
-
11
- [*.{yml,yaml,json}]
12
- indent_style = space
13
- indent_size = 2
14
-
15
- [*.md]
16
- trim_trailing_whitespace = false
17
-
18
- [Makefile]
19
- indent_style = tab
@@ -1,19 +0,0 @@
1
- # 实际执行环境 development
2
- VITE_NODE_ENV= development
3
-
4
- # environment 代码环境
5
- VITE_USE_MODE = development
6
-
7
- VITE_USE_CDN= false
8
-
9
- # 是否开启mock
10
- VITE_USE_MOCK = true
11
-
12
- # 是否使用v-console
13
- VITE_USE_V_CONSOLE = false
14
-
15
- # 是否删除console
16
- VITE_DROP_CONSOLE = false
17
-
18
- # api前缀
19
- VITE_BASE_URL=/mock-server
@@ -1,19 +0,0 @@
1
- # 实际执行环境 production
2
- VITE_NODE_ENV= production
3
-
4
- # environment 代码环境
5
- VITE_USE_MODE = production
6
-
7
- VITE_USE_CDN= false
8
-
9
- # 是否使用v-console
10
- VITE_USE_V_CONSOLE = false
11
-
12
- # 是否开启mock
13
- VITE_USE_MOCK = false
14
-
15
- # 是否删除console
16
- VITE_DROP_CONSOLE = true
17
-
18
- # api前缀
19
- VITE_BASE_URL=/mock-server
@@ -1,19 +0,0 @@
1
- # 实际执行环境 production
2
- VITE_NODE_ENV= test
3
-
4
- # environment 代码环境
5
- VITE_USE_MODE = test
6
-
7
- VITE_USE_CDN= false
8
-
9
- # 是否使用v-console
10
- VITE_USE_V_CONSOLE = true
11
-
12
- # 是否开启mock
13
- VITE_USE_MOCK = true
14
-
15
- # 是否删除console
16
- VITE_DROP_CONSOLE = true
17
-
18
- # api前缀
19
- VITE_BASE_URL=/mock-server
@@ -1,16 +0,0 @@
1
-
2
- *.sh
3
- node_modules
4
- *.md
5
- *.woff
6
- *.ttf
7
- .vscode
8
- .idea
9
- dist
10
- /public
11
- /docs
12
- .husky
13
- .local
14
- .history
15
- /bin
16
- Dockerfile
@@ -1,64 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: {
4
- browser: true,
5
- node: true,
6
- es6: true,
7
- },
8
- parser: 'vue-eslint-parser',
9
- parserOptions: {
10
- parser: '@typescript-eslint/parser',
11
- ecmaVersion: 2020,
12
- sourceType: 'module',
13
- jsxPragma: 'React',
14
- ecmaFeatures: {
15
- jsx: true,
16
- },
17
- },
18
- extends: [
19
- 'plugin:vue/vue3-recommended',
20
- 'plugin:@typescript-eslint/recommended'
21
- ],
22
- rules: {
23
- 'vue/script-setup-uses-vars': 'error',
24
- '@typescript-eslint/ban-ts-ignore': 'off',
25
- '@typescript-eslint/explicit-function-return-type': 'off',
26
- '@typescript-eslint/no-explicit-any': 'off',
27
- '@typescript-eslint/no-var-requires': 'off',
28
- '@typescript-eslint/no-empty-function': 'off',
29
- 'vue/custom-event-name-casing': 'off',
30
- 'no-use-before-define': 'off',
31
- '@typescript-eslint/no-use-before-define': 'off',
32
- '@typescript-eslint/ban-ts-comment': 'off',
33
- '@typescript-eslint/ban-types': 'off',
34
- '@typescript-eslint/no-non-null-assertion': 'off',
35
- '@typescript-eslint/explicit-module-boundary-types': 'off',
36
- '@typescript-eslint/no-unused-vars': [
37
- 'error',
38
- {
39
- argsIgnorePattern: '^_',
40
- varsIgnorePattern: '^_',
41
- },
42
- ],
43
- 'no-unused-vars': [
44
- 'error',
45
- {
46
- argsIgnorePattern: '^_',
47
- varsIgnorePattern: '^_',
48
- },
49
- ],
50
- 'space-before-function-paren': 'off',
51
-
52
- 'vue/attributes-order': 'off',
53
- 'vue/one-component-per-file': 'off',
54
- 'vue/html-closing-bracket-newline': 'off',
55
- 'vue/max-attributes-per-line': 'off',
56
- 'vue/multiline-html-element-content-newline': 'off',
57
- 'vue/singleline-html-element-content-newline': 'off',
58
- 'vue/attribute-hyphenation': 'off',
59
- 'vue/require-default-prop': 'off',
60
- 'vue/require-explicit-emits': 'off',
61
- 'vue/html-self-closing': 0,
62
- 'vue/multi-word-component-names': 'off',
63
- },
64
- };
@@ -1,9 +0,0 @@
1
- /dist/*
2
- .local
3
- .output.js
4
- /node_modules/**
5
-
6
- **/*.svg
7
- **/*.sh
8
-
9
- /public/*
@@ -1,3 +0,0 @@
1
- /dist/*
2
- /public/*
3
- public/*
@@ -1,5 +0,0 @@
1
- const css = []
2
-
3
- const js = []
4
-
5
- export const cdnConf = { css, js }
@@ -1,7 +0,0 @@
1
- import { resolve } from 'path'
2
-
3
- export function generateModifyVars() {
4
- return {
5
- hack: `true; @import (reference) "${resolve('src/design/config.less')}";`
6
- }
7
- }
@@ -1,18 +0,0 @@
1
- import type { GetManualChunk } from 'rollup'
2
-
3
- const vendorLibs: { match: string[]; output: string }[] = [
4
- {
5
- match: ['vant'],
6
- output: 'vant',
7
- }
8
- ]
9
-
10
- export const configManualChunk: GetManualChunk = (id: string) => {
11
- if (/[\\/]node_modules[\\/]/.test(id)) {
12
- const matchItem = vendorLibs.find((item) => {
13
- const reg = new RegExp(`[\\/]node_modules[\\/]_?(${item.match.join('|')})(.*)`, 'ig')
14
- return reg.test(id)
15
- })
16
- return matchItem ? matchItem.output : null
17
- }
18
- }
@@ -1,26 +0,0 @@
1
- import autoImport from 'unplugin-auto-import/vite'
2
- import Components from 'unplugin-vue-components/vite'
3
- import { VantResolver } from 'unplugin-vue-components/resolvers'
4
-
5
- export function createAutoImport() {
6
- return [
7
- autoImport({
8
- include: [
9
- /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
10
- /\.vue$/, /\.vue\?vue/, // .vue
11
- /\.md$/, // .md
12
- ],
13
- imports: [
14
- 'vue',
15
- 'vue-router'
16
- ],
17
- dts: 'types/auto-imports.d.ts'
18
- }),
19
- Components({
20
- resolvers: [
21
- VantResolver()
22
- ],
23
- dts: 'types/components.d.ts'
24
- })
25
- ]
26
- }
@@ -1,26 +0,0 @@
1
- /**
2
- * Plugin to minimize and use ejs template syntax in index.html.
3
- * https://github.com/anncwb/vite-plugin-html
4
- */
5
- import { PluginOption } from 'vite'
6
-
7
- import { createHtmlPlugin } from 'vite-plugin-html'
8
-
9
- import { cdnConf } from '../cdn'
10
-
11
- export function configHtmlPlugin(env: ViteEnv, isBuild: boolean) {
12
-
13
- const htmlPlugin: PluginOption[] = createHtmlPlugin({
14
- minify: isBuild,
15
- inject: {
16
- data: {
17
- injectScript: env.VITE_USE_CDN ? cdnConf.js : [],
18
- injectLink: env.VITE_USE_CDN ? cdnConf.css : [],
19
- injectVlogScript: env.VITE_USE_V_CONSOLE
20
- ? `<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script><script>var vConsole = new window.VConsole();</script>`
21
- : ''
22
- }
23
- }
24
- })
25
- return htmlPlugin
26
- }
@@ -1,50 +0,0 @@
1
- import type { Plugin, PluginOption } from 'vite'
2
-
3
- import vue from '@vitejs/plugin-vue'
4
- import vueJsx from '@vitejs/plugin-vue-jsx'
5
-
6
- import vueSetupExtend from 'vite-plugin-vue-setup-extend'
7
-
8
- import { presetAttributify, presetUno, transformerDirectives } from 'unocss'
9
- import Unocss from 'unocss/vite'
10
-
11
- import { configHtmlPlugin } from './html'
12
- import { configMockPlugin } from './mock'
13
- import { createAutoImport } from './autoImport'
14
-
15
- export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
16
- const {
17
- VITE_USE_MOCK
18
- } = viteEnv
19
-
20
- const vitePlugins: (Plugin | PluginOption[])[] = [
21
- // have to
22
- vue(),
23
- // have to
24
- vueJsx()
25
- ]
26
-
27
- // unocss
28
- vitePlugins.push(Unocss({
29
- presets: [
30
- presetAttributify(),
31
- presetUno()
32
- ],
33
- transformers: [ transformerDirectives() ]
34
- }))
35
-
36
- // vite-plugin-vue-setup-extend
37
- vitePlugins.push(vueSetupExtend())
38
-
39
- // vite-plugin-html
40
- vitePlugins.push(configHtmlPlugin(viteEnv, isBuild))
41
-
42
- // vite-plugin-mock
43
- VITE_USE_MOCK && vitePlugins.push(configMockPlugin(isBuild))
44
-
45
-
46
- // unplugin-auto-import/vite
47
- vitePlugins.push(createAutoImport())
48
-
49
- return vitePlugins
50
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Mock plugin for development and production.
3
- * https://github.com/anncwb/vite-plugin-mock
4
- */
5
- import { viteMockServe } from 'vite-plugin-mock'
6
-
7
- export function configMockPlugin(isBuild: boolean) {
8
- return viteMockServe({
9
- ignore: /^\_/,
10
- mockPath: 'mock',
11
- watchFiles: true,
12
- localEnabled: !isBuild,
13
- prodEnabled: isBuild,
14
- injectCode: `
15
- import { setupProdMockServer } from '../mock/_createProductionServer';
16
-
17
- setupProdMockServer();
18
- `
19
- })
20
- }
@@ -1,14 +0,0 @@
1
- // #!/usr/bin/env node
2
- import chalk from 'chalk'
3
-
4
- import pkg from '../../package.json'
5
-
6
- export const runBuild = async () => {
7
- try {
8
- console.log(`✨ ${chalk.cyan(`[${pkg.name}]`)}` + ' - build successfully!')
9
- } catch (error) {
10
- console.log(chalk.red('vite build error:\n' + error))
11
- process.exit(1)
12
- }
13
- }
14
- runBuild()
@@ -1,24 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="zh">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" href="/favicon.ico" type="image/x-icon" />
6
- <meta
7
- name="viewport"
8
- content="width=device-width,viewport-fit=cover,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"
9
- />
10
- <title>vue-vant-mobile</title>
11
- <% for (var i in injectLink) { %>
12
- <link rel="stylesheet" type="text/css" href="<%= injectLink[i] %>" />
13
- <% } %>
14
- </head>
15
- <body>
16
- <div id="app"></div>
17
- <% for (var i in injectScript) { %>
18
- <script type="text/javascript" src="<%= injectScript[i] %>"></script>
19
- <% } %>
20
- <script type="module" src="/src/main.ts"></script>
21
- <%- injectVlogScript %>
22
- <script src="/js/flexible.js"></script>
23
- </body>
24
- </html>
@@ -1,19 +0,0 @@
1
- import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer'
2
-
3
- const modules = import.meta.globEager('./api/*.ts')
4
-
5
- const mockModules: any[] = []
6
- Object.keys(modules).forEach((key) => {
7
- if (key.includes('/_')) {
8
- return
9
- }
10
- if (modules[key] && modules[key]['default']) mockModules.push(...modules[key]['default'])
11
- return
12
- })
13
-
14
- /**
15
- * Used in a production environment. Need to manually import all modules
16
- */
17
- export function setupProdMockServer() {
18
- createProdMockServer(mockModules)
19
- }
@@ -1,66 +0,0 @@
1
- import { MockMethod } from 'vite-plugin-mock'
2
- import dayjs from 'dayjs'
3
- import { builder } from '../utils'
4
-
5
- export default [
6
- {
7
- url: '/mock-server/get/mock',
8
- method: 'get',
9
- response: () => {
10
- return builder({
11
- data: {
12
- title: '测试表单',
13
- startTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
14
- endTime: dayjs().add(1, 'year').format('YYYY-MM-DD HH:mm:ss'),
15
- goal: '赚钱',
16
- standard: '厉害',
17
- client: 'sf12358',
18
- invites: 'gx12358',
19
- weight: '80',
20
- publicType: '2',
21
- publicUsers: '1'
22
- }
23
- })
24
- }
25
- },
26
- {
27
- url: '/mock-server/get/mock',
28
- method: 'post',
29
- response: () => {
30
- return builder({
31
- data: {
32
- title: '测试表单',
33
- startTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
34
- endTime: dayjs().add(1, 'year').format('YYYY-MM-DD HH:mm:ss'),
35
- goal: '赚钱',
36
- standard: '厉害',
37
- client: 'sf12358',
38
- invites: 'gx12358',
39
- weight: '80',
40
- publicType: '2',
41
- publicUsers: '1'
42
- }
43
- })
44
- }
45
- },
46
- {
47
- url: '/mock-server/formData/mock',
48
- method: 'post',
49
- response: () => {
50
- return builder({
51
- data: {
52
- title: '测试表单',
53
- startTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
54
- endTime: dayjs().add(1, 'year').format('YYYY-MM-DD HH:mm:ss'),
55
- goal: '赚钱',
56
- standard: '厉害',
57
- client: 'sf12358',
58
- invites: 'gx12358',
59
- weight: '80',
60
- publicType: '2',
61
- publicUsers: '1'
62
- }
63
- })
64
- }
65
- },
66
- ] as MockMethod[]
@@ -1,9 +0,0 @@
1
- export const builder = (config?: Partial<ResponseResult>) => {
2
- const code = config?.code || 200
3
- const result: ResponseResult = {
4
- ...config,
5
- code,
6
- msg: config?.msg || code ? 'success' : 'Request failed'
7
- }
8
- return result
9
- }
@@ -1,64 +0,0 @@
1
- {
2
- "name": "gx-mobile-cli",
3
- "version": "0.0.0",
4
- "scripts": {
5
- "dev": "vite",
6
- "build": "vue-tsc && vite build",
7
- "build:pro": "vue-tsc && vite build --mode pro",
8
- "preview": "vite preview"
9
- },
10
- "dependencies": {
11
- "@gx-design-vue/pro-hooks": "^0.1.1",
12
- "@gx-design-vue/pro-utils": "^0.1.1",
13
- "@vueuse/core": "^9.10.0",
14
- "@vueuse/shared": "^9.10.0",
15
- "axios": "^1.1.3",
16
- "crypto-js": "^4.1.1",
17
- "dayjs": "^1.11.6",
18
- "lodash-es": "^4.17.21",
19
- "lodash-unified": "^1.0.3",
20
- "mockjs": "^1.1.0",
21
- "pinia": "^2.0.23",
22
- "qs": "^6.11.0",
23
- "unocss": "^0.48.2",
24
- "vant": "^4.0.8",
25
- "vue": "^3.2.45",
26
- "vue-router": "^4.1.6"
27
- },
28
- "devDependencies": {
29
- "@types/lodash-es": "^4.17.4",
30
- "@types/node": "^17.0.42",
31
- "@typescript-eslint/eslint-plugin": "^5.20.0",
32
- "@typescript-eslint/parser": "^5.20.0",
33
- "@vitejs/plugin-vue": "^4.0.0",
34
- "@vitejs/plugin-vue-jsx": "^3.0.0",
35
- "autoprefixer": "^10.4.13",
36
- "eslint": "^8.13.0",
37
- "eslint-config-prettier": "^8.5.0",
38
- "eslint-plugin-prettier": "^4.0.0",
39
- "eslint-plugin-vue": "^8.6.0",
40
- "less": "^4.1.3",
41
- "less-loader": "^11.1.0",
42
- "postcss": "^8.4.18",
43
- "postcss-html": "^1.5.0",
44
- "postcss-less": "^6.0.0",
45
- "postcss-pxtorem": "^6.0.0",
46
- "prettier": "^2.7.1",
47
- "rollup": "^2.79.1",
48
- "stylelint": "^14.7.1",
49
- "stylelint-config-prettier": "^9.0.3",
50
- "stylelint-config-recommended": "^7.0.0",
51
- "stylelint-config-recommended-vue": "^1.4.0",
52
- "stylelint-config-standard": "^25.0.0",
53
- "stylelint-order": "^5.0.0",
54
- "typescript": "^4.6.4",
55
- "unplugin-auto-import": "^0.11.4",
56
- "unplugin-vue-components": "^0.22.9",
57
- "vite": "^4.0.4",
58
- "vite-plugin-html": "^3.2.0",
59
- "vite-plugin-mock": "^2.9.6",
60
- "vite-plugin-vue-setup-extend": "^0.4.0",
61
- "vue-eslint-parser": "^9.1.0",
62
- "vue-tsc": "^1.0.9"
63
- }
64
- }
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- plugins: {
3
- 'postcss-pxtorem': {
4
- rootValue: 37.5,
5
- propList: ['*'],
6
- },
7
- },
8
- };
@@ -1,18 +0,0 @@
1
- module.exports = {
2
- printWidth: 100,
3
- useTabs: false,
4
- semi: false,
5
- singleQuote: true,
6
- quoteProps: 'as-needed',
7
- bracketSpacing: true,
8
- trailingComma: 'none',
9
- jsxBracketSameLine: false,
10
- jsxSingleQuote: false,
11
- arrowParens: 'always',
12
- insertPragma: false,
13
- requirePragma: false,
14
- proseWrap: 'never',
15
- htmlWhitespaceSensitivity: 'strict',
16
- endOfLine: 'auto',
17
- rangeStart: 0,
18
- };
@@ -1,44 +0,0 @@
1
- (function flexible (window, document) {
2
- var docEl = document.documentElement
3
- var dpr = window.devicePixelRatio || 1
4
-
5
- // adjust body font size
6
- function setBodyFontSize () {
7
- if (document.body) {
8
- document.body.style.fontSize = (12 * dpr) + 'px'
9
- }
10
- else {
11
- document.addEventListener('DOMContentLoaded', setBodyFontSize)
12
- }
13
- }
14
- setBodyFontSize();
15
-
16
- // set 1rem = viewWidth / 10
17
- function setRemUnit () {
18
- var rem = (docEl.clientWidth < 600 ? docEl.clientWidth : 600) / 10
19
- docEl.style.fontSize = rem + 'px'
20
- }
21
-
22
- setRemUnit()
23
-
24
- // reset rem unit on page resize
25
- window.addEventListener('resize', setRemUnit)
26
- window.addEventListener('pageshow', function (e) {
27
- if (e.persisted) {
28
- setRemUnit()
29
- }
30
- })
31
-
32
- // detect 0.5px supports
33
- if (dpr >= 2) {
34
- var fakeBody = document.createElement('body')
35
- var testElement = document.createElement('div')
36
- testElement.style.border = '.5px solid transparent'
37
- fakeBody.appendChild(testElement)
38
- docEl.appendChild(fakeBody)
39
- if (testElement.offsetHeight === 1) {
40
- docEl.classList.add('hairlines')
41
- }
42
- docEl.removeChild(fakeBody)
43
- }
44
- }(window, document))
@@ -1,5 +0,0 @@
1
- <template>
2
- <div id="gx-pro-mobile">
3
- <router-view />
4
- </div>
5
- </template>