@varlet/cli 2.1.0-alpha.1666877950844 → 2.1.0-alpha.1667220413211

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.
@@ -7,13 +7,13 @@ export async function lint() {
7
7
  let spinner;
8
8
  try {
9
9
  spinner = ora('prettier starting...').start();
10
- await execa('prettier', ['--write', '.']);
10
+ await execa('prettier', ['--write', '--cache', '.']);
11
11
  spinner.succeed('prettier success');
12
12
  spinner = ora('stylelint starting...').start();
13
13
  const stylelintPattern = ['./src/**/*.vue', './src/**/*.css', './src/**/*.less'];
14
14
  const hasPackages = isDir(resolve(CWD, 'packages'));
15
15
  hasPackages && stylelintPattern.push('./packages/**/*.vue', './packages/**/*.css', './packages/**/*.less');
16
- await execa('stylelint', [...stylelintPattern, '--fix']);
16
+ await execa('stylelint', [...stylelintPattern, '--fix', '--cache']);
17
17
  spinner.succeed('stylelint success');
18
18
  spinner = ora('eslint starting...').start();
19
19
  const eslintPatterns = [
@@ -28,6 +28,7 @@ export async function lint() {
28
28
  const { stdout } = await execa('eslint', [
29
29
  ...eslintPatterns.filter((pattern) => isDir(resolve(CWD, pattern))),
30
30
  '--fix',
31
+ '--cache',
31
32
  '--ext',
32
33
  ESLINT_EXTENSIONS.join(),
33
34
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/cli",
3
- "version": "2.1.0-alpha.1666877950844",
3
+ "version": "2.1.0-alpha.1667220413211",
4
4
  "type": "module",
5
5
  "description": "cli of varlet",
6
6
  "bin": {
@@ -22,8 +22,7 @@
22
22
  "template",
23
23
  "site",
24
24
  "tsconfig.json",
25
- "preset.cjs",
26
- "CHANGELOG.md"
25
+ "preset.cjs"
27
26
  ],
28
27
  "engines": {
29
28
  "node": "^14.18.0 || >=16.0.0"
@@ -41,8 +40,8 @@
41
40
  "@babel/preset-env": "^7.14.8",
42
41
  "@babel/preset-typescript": "^7.14.5",
43
42
  "@types/inquirer": "^9.0.2",
44
- "@varlet/markdown-vite-plugin": "2.1.0-alpha.1666877950844",
45
- "@varlet/shared": "2.1.0-alpha.1666877950844",
43
+ "@varlet/markdown-vite-plugin": "2.1.0-alpha.1667220413211",
44
+ "@varlet/shared": "2.1.0-alpha.1667220413211",
46
45
  "@vitejs/plugin-vue": "3.0.1",
47
46
  "@vitejs/plugin-vue-jsx": "2.0.0",
48
47
  "@vue/babel-plugin-jsx": "1.1.1",
@@ -81,12 +80,12 @@
81
80
  "@types/lodash-es": "^4.17.5",
82
81
  "@types/node": "^18.7.20",
83
82
  "@types/semver": "^7.3.9",
84
- "@varlet/icons": "2.1.0-alpha.1666877950844",
85
- "@varlet/touch-emulator": "2.1.0-alpha.1666877950844"
83
+ "@varlet/icons": "2.1.0-alpha.1667220413211",
84
+ "@varlet/touch-emulator": "2.1.0-alpha.1667220413211"
86
85
  },
87
86
  "peerDependencies": {
88
- "@varlet/icons": "2.1.0-alpha.1666877950844",
89
- "@varlet/touch-emulator": "2.1.0-alpha.1666877950844",
87
+ "@varlet/icons": "2.1.0-alpha.1667220413211",
88
+ "@varlet/touch-emulator": "2.1.0-alpha.1667220413211",
90
89
  "@vue/runtime-core": "3.2.16",
91
90
  "@vue/test-utils": "^2.0.2",
92
91
  "clipboard": "^2.0.6",
@@ -98,7 +98,7 @@ export function createNamespace(name: string) {
98
98
  }
99
99
  }
100
100
 
101
- export function call<P extends any[], R>(fn?: (...arg: P) => R, ...arg: P): R | undefined {
101
+ export function call<P extends any[], R>(fn?: ((...arg: P) => R) | null, ...arg: P): R | undefined {
102
102
  if (fn) return fn(...arg)
103
103
  }
104
104
 
@@ -128,8 +128,8 @@ watch(
128
128
  @click-overlay="confirmClose"
129
129
  >
130
130
  <div class="varlet-site-playground-container">
131
- <iframe id="playground" class="varlet-site-playground-iframe" :src="context.playgroundURL"
132
- frameborder="0"></iframe>
131
+ <iframe id="playground" class="varlet-site-playground-iframe" :src="context.playgroundURL" allow="clipboard-write">
132
+ </iframe>
133
133
  </div>
134
134
  </var-popup>
135
135
  </template>
@@ -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)
@@ -1,5 +1,5 @@
1
1
  // Component entry, the folder where the file exists will be exposed to the user
2
- import <%- bigCamelizeName %> from './<%- bigCamelizeName %>.vue'
2
+ import <%- bigCamelizeName %> from './<%- bigCamelizeName %><%- style === 'vue' ? '.vue' : '' %>'
3
3
  import type { App } from 'vue'
4
4
 
5
5
  <%- bigCamelizeName %>.install = function(app: App) {
@@ -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,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)