@varlet/cli 1.24.0 → 1.24.2
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.
- package/README.en-US.md +32 -52
- package/README.md +32 -50
- package/generators/base/.husky/commit-msg +1 -1
- package/generators/base/package.json +20 -26
- package/lib/commands/changelog.d.ts +6 -0
- package/lib/commands/changelog.js +27 -0
- package/lib/commands/commitLint.d.ts +1 -0
- package/lib/commands/commitLint.js +21 -0
- package/lib/commands/compile.js +3 -3
- package/lib/commands/create.js +9 -10
- package/lib/commands/dev.js +2 -2
- package/lib/commands/gen.js +8 -4
- package/lib/commands/jest.js +1 -1
- package/lib/commands/release.d.ts +1 -0
- package/lib/commands/release.js +203 -0
- package/lib/compiler/compileSFC.js +5 -5
- package/lib/compiler/compileScript.js +19 -19
- package/lib/compiler/compileSiteEntry.js +8 -8
- package/lib/compiler/compileStyle.js +6 -6
- package/lib/compiler/compileTemplateHighlight.d.ts +5 -5
- package/lib/compiler/compileTemplateHighlight.js +17 -17
- package/lib/compiler/compileTypes.js +5 -5
- package/lib/config/jest.config.js +3 -3
- package/lib/config/varlet.config.d.ts +1 -1
- package/lib/config/varlet.config.js +6 -3
- package/lib/config/vite.config.js +5 -5
- package/lib/index.js +13 -2
- package/package.json +30 -37
- package/site/components/utils/elements.ts +0 -1
- package/site/index.html +3 -0
- package/site/mobile.html +3 -0
- package/generators/base/.gitignore +0 -14
- package/generators/base/commitlint.config.js +0 -3
- package/site/.DS_Store +0 -0
- package/site/components/.DS_Store +0 -0
package/lib/index.js
CHANGED
|
@@ -30,8 +30,11 @@ var jest_1 = require("./commands/jest");
|
|
|
30
30
|
var lint_1 = require("./commands/lint");
|
|
31
31
|
var gen_1 = require("./commands/gen");
|
|
32
32
|
var preview_1 = require("./commands/preview");
|
|
33
|
+
var changelog_1 = require("./commands/changelog");
|
|
34
|
+
var release_1 = require("./commands/release");
|
|
35
|
+
var commitLint_1 = require("./commands/commitLint");
|
|
33
36
|
var program = new commander_1.Command();
|
|
34
|
-
program.version("varlet-cli "
|
|
37
|
+
program.version("varlet-cli ".concat(require('../package.json').version)).usage('<command> [options]');
|
|
35
38
|
program
|
|
36
39
|
.command('dev')
|
|
37
40
|
.option('-f --force', 'Force dep pre-optimization regardless of whether deps have changed')
|
|
@@ -55,10 +58,18 @@ program
|
|
|
55
58
|
.option('-cc --clearCache', 'Clear test cache')
|
|
56
59
|
.action(jest_1.jest);
|
|
57
60
|
program.command('gen <name>').description('Generate cli application').action(gen_1.gen);
|
|
61
|
+
program
|
|
62
|
+
.command('changelog')
|
|
63
|
+
.option('-rc --releaseCount <releaseCount>', 'Release count')
|
|
64
|
+
.option('-f --file <file>', 'Changelog filename')
|
|
65
|
+
.description('Generate changelog')
|
|
66
|
+
.action(changelog_1.changelog);
|
|
67
|
+
program.command('release').description('Release all packages and generate changelogs').action(release_1.release);
|
|
68
|
+
program.command('commit-lint <gitParams>').description('Lint commit message').action(commitLint_1.commitLint);
|
|
58
69
|
program.on('command:*', function (_a) {
|
|
59
70
|
var _b = __read(_a, 1), cmd = _b[0];
|
|
60
71
|
program.outputHelp();
|
|
61
|
-
logger_1.default.error("\nUnknown command "
|
|
72
|
+
logger_1.default.error("\nUnknown command ".concat(cmd, ".\n"));
|
|
62
73
|
process.exitCode = 1;
|
|
63
74
|
});
|
|
64
75
|
program.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/cli",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.2",
|
|
4
4
|
"description": "cli of varlet",
|
|
5
5
|
"bin": {
|
|
6
6
|
"varlet-cli": "./lib/index.js"
|
|
@@ -27,59 +27,42 @@
|
|
|
27
27
|
"bugs": {
|
|
28
28
|
"url": "https://github.com/haoziqaq/varlet/issues"
|
|
29
29
|
},
|
|
30
|
-
"
|
|
31
|
-
"dev": "tsc --watch",
|
|
32
|
-
"build": "tsc"
|
|
33
|
-
},
|
|
34
|
-
"gitHead": "859769307c762134844c0ddfdb69452631f76d62",
|
|
30
|
+
"gitHead": "ee9c3866bedad96c86365b0f9888a3a6bb781b1f",
|
|
35
31
|
"dependencies": {
|
|
32
|
+
"@varlet/icons": "1.24.2",
|
|
33
|
+
"@varlet/markdown-vite-plugin": "1.24.2",
|
|
34
|
+
"@varlet/touch-emulator": "1.24.2",
|
|
36
35
|
"@babel/core": "^7.14.8",
|
|
37
36
|
"@babel/preset-env": "^7.14.8",
|
|
38
37
|
"@babel/preset-typescript": "^7.14.5",
|
|
39
|
-
"@
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"@varlet/eslint-config": "^1.13.0",
|
|
43
|
-
"@varlet/icons": "^1.24.0",
|
|
44
|
-
"@varlet/markdown-vite-plugin": "^1.24.0",
|
|
45
|
-
"@varlet/stylelint-config": "^1.9.0",
|
|
46
|
-
"@varlet/touch-emulator": "^1.0.1",
|
|
38
|
+
"@babel/helper-plugin-utils": "^7.14.5",
|
|
39
|
+
"vue": "3.2.16",
|
|
40
|
+
"vite": "2.6.5",
|
|
47
41
|
"@vitejs/plugin-vue": "1.9.2",
|
|
48
42
|
"@vitejs/plugin-vue-jsx": "1.1.8",
|
|
49
|
-
"
|
|
50
|
-
"@vue/
|
|
51
|
-
"@vue/
|
|
52
|
-
"
|
|
43
|
+
"vite-plugin-html": "^2.1.0",
|
|
44
|
+
"@vue/babel-plugin-jsx": "1.0.7",
|
|
45
|
+
"@vue/compiler-sfc": "3.2.16",
|
|
46
|
+
"conventional-changelog": "^3.1.25",
|
|
53
47
|
"chalk": "^4.1.0",
|
|
48
|
+
"glob": "^7.2.0",
|
|
49
|
+
"semver": "^7.3.5",
|
|
54
50
|
"chokidar": "^3.5.2",
|
|
55
|
-
"clipboard": "^2.0.6",
|
|
56
51
|
"commander": "^8.3.0",
|
|
57
|
-
"commitizen": "^4.2.2",
|
|
58
|
-
"conventional-changelog-cli": "^2.1.1",
|
|
59
|
-
"cz-conventional-changelog": "^3.3.0",
|
|
60
|
-
"eslint": "^7.30.0",
|
|
61
52
|
"execa": "^5.0.0",
|
|
62
53
|
"fs-extra": "^9.0.1",
|
|
63
54
|
"hash-sum": "^2.0.0",
|
|
64
|
-
"husky": "^7.0.1",
|
|
65
55
|
"inquirer": "^8.1.2",
|
|
66
|
-
"jest": "^26.6.3",
|
|
67
56
|
"less": "^3.12.2",
|
|
68
|
-
"lint-staged": "^10.5.0",
|
|
69
|
-
"live-server": "^1.2.1",
|
|
70
57
|
"lodash": "^4.17.21",
|
|
71
|
-
"lodash-es": "^4.17.21",
|
|
72
58
|
"ora": "^5.4.0",
|
|
73
|
-
"prettier": "^2.3.2",
|
|
74
|
-
"release-it": "^14.11.5",
|
|
75
59
|
"slash": "^3.0.0",
|
|
76
|
-
"stylelint": "^13.13.1",
|
|
77
|
-
"ts-jest": "^26.5.1",
|
|
78
60
|
"typescript": "^4.4.4",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
61
|
+
"jest": "^26.6.3",
|
|
62
|
+
"babel-jest": "26.6.3",
|
|
63
|
+
"ts-jest": "^26.5.1",
|
|
81
64
|
"vue-jest": "^5.0.0-alpha.8",
|
|
82
|
-
"
|
|
65
|
+
"lodash-es": "^4.17.21"
|
|
83
66
|
},
|
|
84
67
|
"devDependencies": {
|
|
85
68
|
"@types/babel__core": "^7.1.12",
|
|
@@ -90,6 +73,16 @@
|
|
|
90
73
|
"@types/lodash-es": "^4.17.5"
|
|
91
74
|
},
|
|
92
75
|
"peerDependencies": {
|
|
93
|
-
"
|
|
76
|
+
"@varlet/touch-emulator": "1.24.2",
|
|
77
|
+
"@vue/test-utils": "^2.0.0-rc.6",
|
|
78
|
+
"vue": "3.2.16",
|
|
79
|
+
"vue-router": "4.0.12",
|
|
80
|
+
"live-server": "^1.2.1",
|
|
81
|
+
"lodash-es": "^4.17.21",
|
|
82
|
+
"clipboard": "^2.0.6"
|
|
83
|
+
},
|
|
84
|
+
"scripts": {
|
|
85
|
+
"dev": "tsc --watch",
|
|
86
|
+
"build": "tsc"
|
|
94
87
|
}
|
|
95
|
-
}
|
|
88
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isNumber, isString, toNumber, kebabCase } from './shared'
|
|
2
2
|
import type { StyleVars } from '../../utils'
|
|
3
|
-
import { requestAnimationFrame } from '@varlet/ui/src/utils/elements'
|
|
4
3
|
|
|
5
4
|
export function getLeft(element: HTMLElement): number {
|
|
6
5
|
const { left } = element.getBoundingClientRect()
|
package/site/index.html
CHANGED
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
<link href="<%= logo %>" rel="icon" type="image/png" />
|
|
10
10
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
|
|
11
11
|
name="viewport" />
|
|
12
|
+
<meta property="og:title" content="<%= pcTitle %>" />
|
|
13
|
+
<meta property="og:type" content="website" />
|
|
14
|
+
<meta property="og:image" content="<%= logo %>" />
|
|
12
15
|
<style>
|
|
13
16
|
@font-face {
|
|
14
17
|
font-family: "Roboto";
|
package/site/mobile.html
CHANGED
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
<link href="<%= logo %>" rel="icon" type="image/png" />
|
|
10
10
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
|
|
11
11
|
name="viewport" />
|
|
12
|
+
<meta property="og:title" content="<%= mobileTitle %>" />
|
|
13
|
+
<meta property="og:type" content="website" />
|
|
14
|
+
<meta property="og:image" content="<%= logo %>" />
|
|
12
15
|
<style>
|
|
13
16
|
@font-face {
|
|
14
17
|
font-family: "Roboto";
|
package/site/.DS_Store
DELETED
|
Binary file
|
|
Binary file
|