@varlet/cli 2.1.0-alpha.1667210582672 → 2.1.0

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 (90) hide show
  1. package/lib/client/appType.d.ts +4 -4
  2. package/lib/client/appType.js +7 -7
  3. package/lib/client/index.d.ts +17 -17
  4. package/lib/client/index.js +106 -106
  5. package/lib/node/bin.d.ts +2 -2
  6. package/lib/node/bin.js +122 -122
  7. package/lib/node/commands/build.d.ts +1 -1
  8. package/lib/node/commands/build.js +15 -15
  9. package/lib/node/commands/changelog.d.ts +6 -6
  10. package/lib/node/commands/changelog.js +20 -20
  11. package/lib/node/commands/commitLint.d.ts +1 -1
  12. package/lib/node/commands/commitLint.js +16 -16
  13. package/lib/node/commands/compile.d.ts +7 -7
  14. package/lib/node/commands/compile.js +35 -35
  15. package/lib/node/commands/create.d.ts +8 -8
  16. package/lib/node/commands/create.js +91 -91
  17. package/lib/node/commands/dev.d.ts +5 -5
  18. package/lib/node/commands/dev.js +38 -38
  19. package/lib/node/commands/gen.d.ts +8 -8
  20. package/lib/node/commands/gen.js +69 -68
  21. package/lib/node/commands/jest.d.ts +8 -8
  22. package/lib/node/commands/jest.js +27 -27
  23. package/lib/node/commands/lint.d.ts +1 -1
  24. package/lib/node/commands/lint.js +42 -42
  25. package/lib/node/commands/preview.d.ts +1 -1
  26. package/lib/node/commands/preview.js +18 -18
  27. package/lib/node/commands/release.d.ts +5 -5
  28. package/lib/node/commands/release.js +146 -146
  29. package/lib/node/commands/vite.d.ts +3 -3
  30. package/lib/node/commands/vite.js +13 -13
  31. package/lib/node/compiler/compileModule.d.ts +5 -5
  32. package/lib/node/compiler/compileModule.js +74 -74
  33. package/lib/node/compiler/compileSFC.d.ts +2 -2
  34. package/lib/node/compiler/compileSFC.js +74 -74
  35. package/lib/node/compiler/compileScript.d.ts +17 -17
  36. package/lib/node/compiler/compileScript.js +95 -95
  37. package/lib/node/compiler/compileSiteEntry.d.ts +13 -13
  38. package/lib/node/compiler/compileSiteEntry.js +95 -95
  39. package/lib/node/compiler/compileStyle.d.ts +11 -11
  40. package/lib/node/compiler/compileStyle.js +39 -39
  41. package/lib/node/compiler/compileTemplateHighlight.d.ts +10 -10
  42. package/lib/node/compiler/compileTemplateHighlight.js +133 -133
  43. package/lib/node/compiler/compileTypes.d.ts +2 -2
  44. package/lib/node/compiler/compileTypes.js +30 -30
  45. package/lib/node/config/varlet.config.d.ts +45 -45
  46. package/lib/node/config/varlet.config.js +27 -27
  47. package/lib/node/config/varlet.default.config.d.ts +2 -2
  48. package/lib/node/config/varlet.default.config.js +264 -264
  49. package/lib/node/config/vite.config.d.ts +6 -6
  50. package/lib/node/config/vite.config.js +142 -142
  51. package/lib/node/index.d.ts +1 -1
  52. package/lib/node/index.js +1 -1
  53. package/lib/node/shared/constant.d.ts +42 -42
  54. package/lib/node/shared/constant.js +47 -47
  55. package/lib/node/shared/fsUtils.d.ts +13 -13
  56. package/lib/node/shared/fsUtils.js +48 -48
  57. package/lib/node/shared/logger.d.ts +8 -8
  58. package/lib/node/shared/logger.js +18 -18
  59. package/package.json +7 -7
  60. package/site/components/button/index.ts +10 -10
  61. package/site/components/cell/index.ts +10 -10
  62. package/site/components/code-example/codeExample.less +41 -41
  63. package/site/components/code-example/index.ts +10 -10
  64. package/site/components/context/zIndex.ts +20 -20
  65. package/site/components/icon/icon.less +26 -26
  66. package/site/components/icon/index.ts +10 -10
  67. package/site/components/icon/props.ts +24 -24
  68. package/site/components/loading/index.ts +10 -10
  69. package/site/components/progress/index.ts +10 -10
  70. package/site/components/snackbar/snackbar.less +135 -135
  71. package/site/components/styles/common.less +64 -64
  72. package/site/components/styles/elevation.less +126 -126
  73. package/site/components/styles/var.less +27 -27
  74. package/site/index.html +49 -49
  75. package/site/mobile/components/app-bar/index.ts +10 -10
  76. package/site/mobile/components/app-bar/props.ts +25 -25
  77. package/site/mobile.html +41 -41
  78. package/site/module.d.ts +5 -5
  79. package/site/tsconfig.json +11 -11
  80. package/template/create/example/index.vue.ejs +4 -2
  81. package/template/generators/base/_gitignore +5 -1
  82. package/template/generators/base/babel.config.js +1 -1
  83. package/template/generators/config/default/sfc/src/button/example/index.vue +1 -1
  84. package/template/generators/config/default/tsx/src/button/example/index.vue +1 -1
  85. package/template/generators/config/i18n/sfc/src/button/example/BasicUse.vue +1 -1
  86. package/template/generators/config/i18n/sfc/src/button/example/ModifyColor.vue +1 -1
  87. package/template/generators/config/i18n/sfc/src/button/example/index.vue +1 -2
  88. package/template/generators/config/i18n/tsx/src/button/example/BasicUse.vue +1 -1
  89. package/template/generators/config/i18n/tsx/src/button/example/ModifyColor.vue +1 -1
  90. package/template/generators/config/i18n/tsx/src/button/example/index.vue +1 -2
package/site/module.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- declare module 'clipboard'
2
- declare module '@pc-routes'
3
- declare module '@mobile-routes'
4
- declare module '@config'
5
- declare module 'vue-router'
1
+ declare module 'clipboard'
2
+ declare module '@pc-routes'
3
+ declare module '@mobile-routes'
4
+ declare module '@config'
5
+ declare module 'vue-router'
@@ -1,11 +1,11 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es5",
4
- "strict": true,
5
- "downlevelIteration": true,
6
- "skipLibCheck": true,
7
- "esModuleInterop": true,
8
- "jsx": "preserve",
9
- "lib": ["esnext", "dom"]
10
- }
11
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "strict": true,
5
+ "downlevelIteration": true,
6
+ "skipLibCheck": true,
7
+ "esModuleInterop": true,
8
+ "jsx": "preserve",
9
+ "lib": ["esnext", "dom"]
10
+ }
11
+ }
@@ -1,8 +1,10 @@
1
1
  <script setup>
2
2
  import <%- bigCamelizeNamespace + bigCamelizeName %> from '../index'
3
- import AppType from '@varlet/cli/site/mobile/components/AppType'
3
+ <% if (!locale) { -%>
4
+ import { AppType } from '@varlet/cli/client'
5
+ <% } -%>
4
6
  <% if (locale) { -%>
5
- import { watchLang } from '@varlet/cli/site/utils'
7
+ import { watchLang, AppType } from '@varlet/cli/client'
6
8
  import { use, pack } from './locale'
7
9
 
8
10
  watchLang(use)
@@ -11,4 +11,8 @@ lib
11
11
  es
12
12
  umd
13
13
  coverage
14
- highlight
14
+ highlight
15
+
16
+
17
+ .eslintcache
18
+ .stylelintcache
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  presets: [
3
3
  [
4
- '@varlet/cli/preset',
4
+ '@varlet/cli/preset.cjs',
5
5
  {
6
6
  loose: process.env.NODE_ENV === 'compile',
7
7
  },
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import VarButton from '..'
3
- import AppType from '@varlet/cli/site/mobile/components/AppType'
3
+ import { AppType } from '@varlet/cli/client'
4
4
  </script>
5
5
 
6
6
  <template>
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import VarButton from '..'
3
- import AppType from '@varlet/cli/site/mobile/components/AppType'
3
+ import { AppType } from '@varlet/cli/client'
4
4
  </script>
5
5
 
6
6
  <template>
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import VarButton from '..'
3
- import { watchLang } from '@varlet/cli/site/utils'
3
+ import { watchLang } from '@varlet/cli/client'
4
4
  import { pack, use } from './locale'
5
5
 
6
6
  watchLang(use, 'pc')
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import VarButton from '..'
3
- import { watchLang } from '@varlet/cli/site/utils'
3
+ import { watchLang } from '@varlet/cli/client'
4
4
  import { pack, use } from './locale'
5
5
 
6
6
  watchLang(use, 'pc')
@@ -1,7 +1,6 @@
1
1
  <script setup>
2
2
  import VarButton from '..'
3
- import AppType from '@varlet/cli/site/mobile/components/AppType'
4
- import { watchLang } from '@varlet/cli/site/utils'
3
+ import { watchLang, AppType } from '@varlet/cli/client'
5
4
  import { pack, use } from './locale'
6
5
 
7
6
  watchLang(use)
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import VarButton from '..'
3
- import { watchLang } from '@varlet/cli/site/utils'
3
+ import { watchLang } from '@varlet/cli/client'
4
4
  import { pack, use } from './locale'
5
5
 
6
6
  watchLang(use, 'pc')
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import VarButton from '..'
3
- import { watchLang } from '@varlet/cli/site/utils'
3
+ import { watchLang } from '@varlet/cli/client'
4
4
  import { pack, use } from './locale'
5
5
 
6
6
  watchLang(use, 'pc')
@@ -1,7 +1,6 @@
1
1
  <script setup>
2
2
  import VarButton from '..'
3
- import AppType from '@varlet/cli/site/mobile/components/AppType'
4
- import { watchLang } from '@varlet/cli/site/utils'
3
+ import { watchLang, AppType } from '@varlet/cli/client'
5
4
  import { pack, use } from './locale'
6
5
 
7
6
  watchLang(use)