@varlet/cli 1.23.4-alpha.8 → 1.23.11

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 (50) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/generators/{sfc → base}/.gitignore +0 -0
  3. package/generators/{sfc → base}/.husky/commit-msg +0 -0
  4. package/generators/{sfc → base}/.husky/pre-commit +0 -0
  5. package/generators/{tsx → base}/.prettierignore +0 -1
  6. package/generators/{sfc → base}/.prettierrc +0 -0
  7. package/generators/{sfc → base}/README.md +0 -0
  8. package/generators/{sfc → base}/babel.config.js +0 -0
  9. package/generators/{sfc → base}/commitlint.config.js +0 -0
  10. package/generators/{sfc → base}/docs/home.zh-CN.md +0 -0
  11. package/generators/{sfc → base}/package.json +0 -0
  12. package/generators/{sfc → base}/public/highlight.css +0 -0
  13. package/generators/{sfc → base}/public/logo.svg +0 -0
  14. package/generators/{sfc → base}/shims/shims-md.d.ts +0 -0
  15. package/generators/{sfc → base}/shims/shims-vue.d.ts +0 -0
  16. package/generators/{sfc → base}/tsconfig.json +0 -0
  17. package/generators/{sfc → base}/types/basicComponent.d.ts +0 -0
  18. package/generators/{sfc → base}/types/button.d.ts +0 -0
  19. package/generators/{sfc → base}/types/index.d.ts +0 -0
  20. package/generators/{sfc → base}/varlet.config.js +0 -0
  21. package/lib/commands/dev.js +1 -1
  22. package/lib/commands/gen.js +7 -3
  23. package/lib/compiler/compileModule.js +3 -1
  24. package/lib/compiler/compileSiteEntry.js +1 -1
  25. package/lib/compiler/compileTypes.d.ts +1 -0
  26. package/lib/compiler/compileTypes.js +5 -1
  27. package/lib/config/vite.config.js +4 -1
  28. package/lib/shared/fsUtils.d.ts +1 -0
  29. package/lib/shared/fsUtils.js +3 -1
  30. package/package.json +3 -3
  31. package/site/pc/App.vue +1 -1
  32. package/generators/sfc/.prettierignore +0 -8
  33. package/generators/tsx/.gitignore +0 -14
  34. package/generators/tsx/.husky/commit-msg +0 -4
  35. package/generators/tsx/.husky/pre-commit +0 -4
  36. package/generators/tsx/.prettierrc +0 -5
  37. package/generators/tsx/README.md +0 -88
  38. package/generators/tsx/babel.config.js +0 -10
  39. package/generators/tsx/commitlint.config.js +0 -3
  40. package/generators/tsx/docs/home.zh-CN.md +0 -11
  41. package/generators/tsx/package.json +0 -98
  42. package/generators/tsx/public/highlight.css +0 -1
  43. package/generators/tsx/public/logo.svg +0 -1
  44. package/generators/tsx/shims/shims-md.d.ts +0 -4
  45. package/generators/tsx/shims/shims-vue.d.ts +0 -6
  46. package/generators/tsx/tsconfig.json +0 -13
  47. package/generators/tsx/types/basicComponent.d.ts +0 -7
  48. package/generators/tsx/types/button.d.ts +0 -12
  49. package/generators/tsx/types/index.d.ts +0 -6
  50. package/generators/tsx/varlet.config.js +0 -106
package/CHANGELOG.md CHANGED
@@ -3,6 +3,54 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.23.11](https://github.com/haoziqaq/varlet/compare/v1.23.10...v1.23.11) (2021-12-10)
7
+
8
+ **Note:** Version bump only for package @varlet/cli
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.23.8](https://github.com/haoziqaq/varlet/compare/v1.23.7...v1.23.8) (2021-11-24)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **cli:** add ts ignore to generate routes ([3363578](https://github.com/haoziqaq/varlet/commit/3363578eb2763282fd3c274ab75374cbff94c92b))
20
+
21
+
22
+
23
+
24
+
25
+ ## [1.23.7](https://github.com/haoziqaq/varlet/compare/v1.23.6...v1.23.7) (2021-11-23)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **ui/themes, cli:** fix themes types ([f29511a](https://github.com/haoziqaq/varlet/commit/f29511a016edb462bdf578a6b5a19fbe10a22158))
31
+
32
+
33
+
34
+
35
+
36
+ ## [1.23.5](https://github.com/haoziqaq/varlet/compare/v1.23.4...v1.23.5) (2021-11-21)
37
+
38
+
39
+ ### Bug Fixes
40
+
41
+ * **cli:** add module moduleCompatible option in varlet.config.js ([0b1d95f](https://github.com/haoziqaq/varlet/commit/0b1d95fc740a225240ee3f28e06015f4538b2304))
42
+ * **cli:** expose lib folder ([2a8848a](https://github.com/haoziqaq/varlet/commit/2a8848a6f064aa91d56875ba467c46da79589a79))
43
+ * **cli:** fix commonjs compiler ([c5c2b12](https://github.com/haoziqaq/varlet/commit/c5c2b12f163bed130b3c6c0ee0eb805fe4a015f1))
44
+ * **cli:** fix inline css plugin ([3e8b7b4](https://github.com/haoziqaq/varlet/commit/3e8b7b4e5489bc67dd38f8787477f07e2a13e7ac))
45
+ * **cli/compile:** add commonjs bundle ([4a424d4](https://github.com/haoziqaq/varlet/commit/4a424d4c066f7de69cbf561a5bc9279862739637))
46
+ * **cli/compile:** add match commonjs script extname function ([2b5b1bd](https://github.com/haoziqaq/varlet/commit/2b5b1bde5e1c16d4e58ce2a100ae4a1a3cc428ce))
47
+ * **cli/compile:** fix compile module readdir ([9c3ad08](https://github.com/haoziqaq/varlet/commit/9c3ad08410009e50b288f033b8fdbe10a8c01160))
48
+ * **ui/popup,input:** support nuxt ([def81ef](https://github.com/haoziqaq/varlet/commit/def81ef821a8ce679287702316bd98ca363bc7f4))
49
+
50
+
51
+
52
+
53
+
6
54
  ## [1.23.3](https://github.com/haoziqaq/varlet/compare/v1.23.2...v1.23.3) (2021-11-20)
7
55
 
8
56
 
File without changes
File without changes
File without changes
@@ -3,6 +3,5 @@ es/**
3
3
  umd/**
4
4
  site/**
5
5
  public/**
6
- src/*/__tests__/**
7
6
  *.md
8
7
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -99,7 +99,7 @@ function startServer(force) {
99
99
  watcher = chokidar_1.default.watch(constant_1.VARLET_CONFIG);
100
100
  watcher.on('change', function () { return startServer(force); });
101
101
  }
102
- logger_1.default.info((isRestart ? 'Res' : 'S') + "tart successfully!!!");
102
+ logger_1.default.success("\n" + (isRestart ? 'Res' : 'S') + "tart successfully!!!");
103
103
  return [2 /*return*/];
104
104
  }
105
105
  });
@@ -46,7 +46,7 @@ var path_1 = require("path");
46
46
  var fs_extra_1 = require("fs-extra");
47
47
  var constant_1 = require("../shared/constant");
48
48
  function removeFiles(dest) {
49
- var files = ['es', 'umd', 'highlight', 'types/index.d.ts', '.varlet', 'node_modules'];
49
+ var files = ['es', 'lib', 'umd', 'highlight', 'types/index.d.ts', '.varlet', 'node_modules'];
50
50
  files.forEach(function (filename) { return (0, fs_extra_1.removeSync)((0, path_1.resolve)(dest, filename)); });
51
51
  }
52
52
  function syncVersion(name) {
@@ -59,7 +59,7 @@ function syncVersion(name) {
59
59
  }
60
60
  function gen(name) {
61
61
  return __awaiter(this, void 0, void 0, function () {
62
- var dest, ret, choice, generator;
62
+ var dest, ret, choice, generator, base;
63
63
  return __generator(this, function (_a) {
64
64
  switch (_a.label) {
65
65
  case 0:
@@ -79,8 +79,12 @@ function gen(name) {
79
79
  ret = _a.sent();
80
80
  choice = ret['Please select your component library programming style'];
81
81
  generator = (0, path_1.resolve)(constant_1.GENERATORS_DIR, choice);
82
- return [4 /*yield*/, (0, fs_extra_1.copy)(generator, dest)];
82
+ base = (0, path_1.resolve)(constant_1.GENERATORS_DIR, 'base');
83
+ return [4 /*yield*/, (0, fs_extra_1.copy)(base, dest)];
83
84
  case 2:
85
+ _a.sent();
86
+ return [4 /*yield*/, (0, fs_extra_1.copy)(generator, dest)];
87
+ case 3:
84
88
  _a.sent();
85
89
  removeFiles(dest);
86
90
  syncVersion(name);
@@ -47,6 +47,7 @@ var compileScript_1 = require("./compileScript");
47
47
  var compileStyle_1 = require("./compileStyle");
48
48
  var vite_config_1 = require("../config/vite.config");
49
49
  var varlet_config_1 = require("../config/varlet.config");
50
+ var compileTypes_1 = require("./compileTypes");
50
51
  function compileUMD() {
51
52
  return new Promise(function (resolve, reject) {
52
53
  var config = (0, vite_config_1.getUMDConfig)((0, varlet_config_1.getVarletConfig)());
@@ -67,7 +68,7 @@ function compileDir(dir) {
67
68
  return [4 /*yield*/, Promise.all(dirs.map(function (filename) {
68
69
  var file = (0, path_1.resolve)(dir, filename);
69
70
  [constant_1.TESTS_DIR_NAME, constant_1.EXAMPLE_DIR_NAME, constant_1.DOCS_DIR_NAME].includes(filename) && (0, fs_extra_1.removeSync)(file);
70
- if (filename === constant_1.STYLE_DIR_NAME) {
71
+ if ((0, fsUtils_1.isDTS)(file) || filename === constant_1.STYLE_DIR_NAME) {
71
72
  return Promise.resolve();
72
73
  }
73
74
  return compileFile(file);
@@ -161,6 +162,7 @@ function compileModule(modules) {
161
162
  return [4 /*yield*/, (modules === 'commonjs' ? (0, compileScript_1.compileCommonJSEntry)(dest, publicDirs) : (0, compileScript_1.compileESEntry)(dest, publicDirs))];
162
163
  case 7:
163
164
  _a.sent();
165
+ (0, compileTypes_1.generateReference)(dest);
164
166
  return [2 /*return*/];
165
167
  }
166
168
  });
@@ -161,7 +161,7 @@ function buildMobileSiteRoutes() {
161
161
  case 0: return [4 /*yield*/, findExamplePaths()];
162
162
  case 1:
163
163
  examplePaths = _a.sent();
164
- routes = examplePaths.map(function (examplePath) { return "\n {\n path: '" + getExampleRoutePath(examplePath) + "',\n component: () => import('" + examplePath + "')\n }"; });
164
+ routes = examplePaths.map(function (examplePath) { return "\n {\n path: '" + getExampleRoutePath(examplePath) + "',\n // @ts-ignore\n component: () => import('" + examplePath + "')\n }"; });
165
165
  source = "export default [ " + routes.join(',') + "\n]";
166
166
  return [4 /*yield*/, (0, fsUtils_1.outputFileSyncOnChange)(constant_1.SITE_MOBILE_ROUTES, source)];
167
167
  case 2:
@@ -1 +1,2 @@
1
+ export declare function generateReference(moduleDir: string): void;
1
2
  export declare function compileTypes(): Promise<void>;
@@ -36,13 +36,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.compileTypes = void 0;
39
+ exports.compileTypes = exports.generateReference = void 0;
40
40
  var fs_extra_1 = require("fs-extra");
41
41
  var constant_1 = require("../shared/constant");
42
42
  var fsUtils_1 = require("../shared/fsUtils");
43
43
  var path_1 = require("path");
44
44
  var varlet_config_1 = require("../config/varlet.config");
45
45
  var lodash_1 = require("lodash");
46
+ function generateReference(moduleDir) {
47
+ (0, fs_extra_1.writeFileSync)((0, path_1.resolve)(moduleDir, 'index.d.ts'), "export * from '" + (0, path_1.relative)(moduleDir, constant_1.TYPES_DIR) + "'\n");
48
+ }
49
+ exports.generateReference = generateReference;
46
50
  function compileTypes() {
47
51
  return __awaiter(this, void 0, void 0, function () {
48
52
  var varletConfig, namespace, name, dir, ignoreEntryDir, exports, declares, template, globalTemplate;
@@ -80,13 +80,16 @@ function inlineCSS(fileName, dir) {
80
80
  apply: 'build',
81
81
  closeBundle: function () {
82
82
  var cssFile = (0, path_1.resolve)(dir, 'style.css');
83
+ if (!(0, fs_extra_1.pathExistsSync)(cssFile)) {
84
+ return;
85
+ }
83
86
  var jsFile = (0, path_1.resolve)(dir, fileName);
84
87
  var cssCode = (0, fs_extra_1.readFileSync)(cssFile, 'utf-8');
85
88
  var jsCode = (0, fs_extra_1.readFileSync)(jsFile, 'utf-8');
86
89
  var injectCode = ";(function(){var style=document.createElement('style');style.type='text/css';style.rel='stylesheet';style.appendChild(document.createTextNode(`" + cssCode.replace(/\\/g, '\\\\') + "`));var head=document.querySelector('head');head.appendChild(style)})();";
90
+ (0, fs_extra_1.writeFileSync)(jsFile, "" + injectCode + jsCode);
87
91
  (0, fs_extra_1.copyFileSync)(cssFile, (0, path_1.resolve)(constant_1.LIB_DIR, 'style.css'));
88
92
  (0, fs_extra_1.removeSync)(cssFile);
89
- (0, fs_extra_1.writeFileSync)(jsFile, "" + injectCode + jsCode);
90
93
  },
91
94
  };
92
95
  }
@@ -4,6 +4,7 @@ export declare const isDir: (file: string) => boolean;
4
4
  export declare const isSFC: (file: string) => boolean;
5
5
  export declare const isJSX: (file: string) => boolean;
6
6
  export declare const isTSX: (file: string) => boolean;
7
+ export declare const isDTS: (file: string) => boolean;
7
8
  export declare const isScript: (file: string) => boolean;
8
9
  export declare const isLess: (file: string) => boolean;
9
10
  export declare const isPublicDir: (dir: string) => boolean;
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.outputFileSyncOnChange = exports.smartAppendFileSync = exports.camelize = exports.bigCamelize = exports.replaceExt = exports.isPublicDir = exports.isLess = exports.isScript = exports.isTSX = exports.isJSX = exports.isSFC = exports.isDir = exports.isMD = exports.getPublicDirs = void 0;
39
+ exports.outputFileSyncOnChange = exports.smartAppendFileSync = exports.camelize = exports.bigCamelize = exports.replaceExt = exports.isPublicDir = exports.isLess = exports.isScript = exports.isDTS = exports.isTSX = exports.isJSX = exports.isSFC = exports.isDir = exports.isMD = exports.getPublicDirs = void 0;
40
40
  var path_1 = require("path");
41
41
  var fs_extra_1 = require("fs-extra");
42
42
  var constant_1 = require("./constant");
@@ -64,6 +64,8 @@ var isJSX = function (file) { return (0, fs_extra_1.pathExistsSync)(file) && (0,
64
64
  exports.isJSX = isJSX;
65
65
  var isTSX = function (file) { return (0, fs_extra_1.pathExistsSync)(file) && (0, path_1.extname)(file) === '.tsx'; };
66
66
  exports.isTSX = isTSX;
67
+ var isDTS = function (file) { return (0, fs_extra_1.pathExistsSync)(file) && file.endsWith('.d.ts'); };
68
+ exports.isDTS = isDTS;
67
69
  var isScript = function (file) { return (0, fs_extra_1.pathExistsSync)(file) && constant_1.SCRIPTS_EXTENSIONS.includes((0, path_1.extname)(file)); };
68
70
  exports.isScript = isScript;
69
71
  var isLess = function (file) { return (0, fs_extra_1.pathExistsSync)(file) && (0, path_1.extname)(file) === '.less'; };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/cli",
3
- "version": "1.23.4-alpha.8+c5c2b12f",
3
+ "version": "1.23.11",
4
4
  "description": "cli of varlet",
5
5
  "bin": {
6
6
  "varlet-cli": "./lib/index.js"
@@ -31,7 +31,7 @@
31
31
  "dev": "tsc --watch",
32
32
  "build": "tsc"
33
33
  },
34
- "gitHead": "c5c2b12f163bed130b3c6c0ee0eb805fe4a015f1",
34
+ "gitHead": "449df88f0ff65a2ad89fa48a5d443ab864bd0bb3",
35
35
  "dependencies": {
36
36
  "@babel/core": "^7.14.8",
37
37
  "@babel/preset-env": "^7.14.8",
@@ -47,7 +47,7 @@
47
47
  "@vitejs/plugin-vue": "1.9.2",
48
48
  "@vitejs/plugin-vue-jsx": "1.1.8",
49
49
  "@vue/babel-plugin-jsx": "^1.0.7",
50
- "@vue/compiler-sfc": "3.2.16",
50
+ "@vue/compiler-sfc": "3.2.22",
51
51
  "@vue/test-utils": "^2.0.0-rc.6",
52
52
  "babel-jest": "26.6.3",
53
53
  "chalk": "^4.1.0",
package/site/pc/App.vue CHANGED
@@ -37,7 +37,7 @@ import AppSidebar from './components/AppSidebar'
37
37
  import { defineComponent, nextTick, onMounted, ref, Ref, watch } from 'vue'
38
38
  import { useRoute } from 'vue-router'
39
39
  import { get } from 'lodash-es'
40
- import { getPCLocationInfo, isPhone, MenuTypes, setThemes } from '../utils'
40
+ import { getPCLocationInfo, isPhone, MenuTypes } from '../utils'
41
41
 
42
42
  export interface Menu {
43
43
  doc: string
@@ -1,8 +0,0 @@
1
- coverage/**
2
- es/**
3
- umd/**
4
- site/**
5
- public/**
6
- src/*/__tests__/**
7
- *.md
8
-
@@ -1,14 +0,0 @@
1
- node_modules
2
-
3
- .varlet
4
- .idea
5
- .vscode
6
- *.log
7
- .DS_Store
8
-
9
- site
10
- lib
11
- es
12
- umd
13
- coverage
14
- highlight
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- npx --no-install commitlint --edit $1
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- npx --no-install lint-staged
@@ -1,5 +0,0 @@
1
- {
2
- "printWidth": 120,
3
- "singleQuote": true,
4
- "semi": false
5
- }
@@ -1,88 +0,0 @@
1
- # varlet-cli-app
2
-
3
- ### Reference
4
-
5
- [@varlet/cli 中文文档](https://github.com/haoziqaq/varlet/blob/dev/packages/varlet-cli/README.md)
6
- [@varlet/cli documentation](https://github.com/haoziqaq/varlet/blob/dev/packages/varlet-cli/README.en-US.md)
7
-
8
- ### Quickstart
9
-
10
- ```shell
11
- yarn
12
- yarn dev
13
- ```
14
-
15
- ### Commands
16
-
17
- #### Start the development server
18
-
19
- ```shell
20
- yarn dev
21
- ```
22
-
23
- #### Build documentation site
24
-
25
- ```shell
26
- yarn build
27
- ```
28
-
29
- #### Building component libraries
30
-
31
- ```shell
32
- yarn compile
33
- ```
34
-
35
- #### Lint code
36
-
37
- ```shell
38
- yarn lint
39
- ```
40
-
41
- #### Run unit test
42
-
43
- ```shell
44
- yarn test
45
- ```
46
-
47
- #### Run unit test in watch mode
48
-
49
- ```shell
50
- yarn test:watch
51
- or
52
- yarn test:watchAll
53
- ```
54
-
55
- #### Quickly create a component folder
56
-
57
- ```shell
58
- yarn run create <componentName>
59
- ```
60
-
61
- #### Mount git hook
62
-
63
- ```shell
64
- yarn husky
65
- ```
66
-
67
- #### Generate changelog
68
-
69
- ```shell
70
- yarn genlog
71
- ```
72
-
73
- #### Generate all changelog
74
-
75
- ```shell
76
- yarn genAllLog
77
- ```
78
-
79
- #### Publish
80
-
81
- tips:
82
- - 1.The registry of npm and yarn must be the official source of npm
83
- - 2.Both npm and yarn must be logged in
84
-
85
- ```shell
86
- yarn release
87
- ```
88
-
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- presets: [
3
- [
4
- '@varlet/cli/preset',
5
- {
6
- loose: process.env.NODE_ENV === 'compile',
7
- },
8
- ],
9
- ],
10
- }
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- extends: ['@commitlint/config-conventional'],
3
- }
@@ -1,11 +0,0 @@
1
- <div class="varlet-introduce">
2
- <div class="varlet-introduce__row">
3
- <img class="varlet-introduce__image" src="../public/logo.svg" />
4
- <div class="varlet-introduce__name">Basic UI</div>
5
- </div>
6
- <div class="varlet-introduce__des">一个组件库</div>
7
- </div>
8
-
9
- ### 介绍
10
-
11
- 这里可以介绍一下组件库, 想写什么就写什么...
@@ -1,98 +0,0 @@
1
- {
2
- "name": "basic-ui",
3
- "version": "0.0.0",
4
- "description": "A basic components library",
5
- "main": "lib/index.js",
6
- "module": "es/index.js",
7
- "typings": "types/index.d.ts",
8
- "vetur": {
9
- "tags": "highlight/tags.json",
10
- "attributes": "highlight/attributes.json"
11
- },
12
- "web-types": "highlight/web-types.json",
13
- "keywords": [
14
- "Vue",
15
- "UI"
16
- ],
17
- "license": "MIT",
18
- "scripts": {
19
- "husky": "husky install",
20
- "commit": "git-cz",
21
- "dev": "varlet-cli dev",
22
- "build": "varlet-cli build",
23
- "preview": "varlet-cli preview",
24
- "compile": "varlet-cli compile",
25
- "create": "varlet-cli create",
26
- "lint": "varlet-cli lint",
27
- "genlog": "conventional-changelog -p angular -i CHANGELOG.md -s",
28
- "genAllLog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
29
- "release": "yarn compile && release-it",
30
- "test": "varlet-cli jest",
31
- "test:watch": "varlet-cli jest -w",
32
- "test:watchAll": "varlet-cli jest -wa"
33
- },
34
- "peerDependencies": {
35
- "vue": "^3.2.0"
36
- },
37
- "devDependencies": {
38
- "@varlet/cli": "^1.20.0-alpha.0",
39
- "vue": "3.2.16"
40
- },
41
- "release-it": {
42
- "git": {
43
- "changelog": "git log --pretty=format:\"* %s (%h)\" ${from}...${to}",
44
- "tagName": "v${version}",
45
- "commitMessage": "chore: release ${version}",
46
- "requireCleanWorkingDir": false
47
- },
48
- "plugins": {
49
- "@release-it/conventional-changelog": {
50
- "preset": "angular",
51
- "infile": "CHANGELOG.md"
52
- }
53
- }
54
- },
55
- "config": {
56
- "commitizen": {
57
- "path": "cz-conventional-changelog"
58
- }
59
- },
60
- "lint-staged": {
61
- "*.{ts,tsx,js,vue,less}": "prettier --write",
62
- "*.{ts,tsx,js,vue}": "eslint --fix",
63
- "*.{vue,css,less}": "stylelint --fix"
64
- },
65
- "eslintConfig": {
66
- "root": true,
67
- "ignorePatterns": [
68
- "lib/**",
69
- "es/**",
70
- "umd/**",
71
- "site/**",
72
- "public/**",
73
- "src/*/__tests__/**",
74
- ".varlet/**"
75
- ],
76
- "extends": [
77
- "@varlet"
78
- ]
79
- },
80
- "stylelint": {
81
- "extends": [
82
- "@varlet/stylelint-config"
83
- ],
84
- "ignoreFiles": [
85
- "lib/**",
86
- "es/**",
87
- "umd/**",
88
- "site/**",
89
- "coverage/**",
90
- "public/**",
91
- "highlight/**"
92
- ]
93
- },
94
- "browserslist": [
95
- "Chrome >= 51",
96
- "iOS >= 10"
97
- ]
98
- }
@@ -1 +0,0 @@
1
- .hljs{display:block;overflow-x:auto;padding:.5em;background:#011627;color:#d6deeb}.hljs-keyword{color:#c792ea;font-style:italic}.hljs-built_in{color:#addb67;font-style:italic}.hljs-type{color:#82aaff}.hljs-literal{color:#ff5874}.hljs-number{color:#f78c6c}.hljs-regexp{color:#5ca7e4}.hljs-string{color:#ecc48d}.hljs-subst{color:#d3423e}.hljs-symbol{color:#82aaff}.hljs-class{color:#ffcb8b}.hljs-function{color:#82aaff}.hljs-title{color:#dcdcaa;font-style:italic}.hljs-params{color:#7fdbca}.hljs-comment{color:#637777;font-style:italic}.hljs-doctag{color:#7fdbca}.hljs-meta{color:#82aaff}.hljs-meta-keyword{color:#82aaff}.hljs-meta-string{color:#ecc48d}.hljs-section{color:#82b1ff}.hljs-builtin-name,.hljs-name,.hljs-tag{color:#7fdbca}.hljs-attr{color:#7fdbca}.hljs-attribute{color:#80cbc4}.hljs-variable{color:#addb67}.hljs-bullet{color:#d9f5dd}.hljs-code{color:#80cbc4}.hljs-emphasis{color:#c792ea;font-style:italic}.hljs-strong{color:#addb67;font-weight:700}.hljs-formula{color:#c792ea}.hljs-link{color:#ff869a}.hljs-quote{color:#697098;font-style:italic}.hljs-selector-tag{color:#ff6363}.hljs-selector-id{color:#fad430}.hljs-selector-class{color:#addb67;font-style:italic}.hljs-selector-attr,.hljs-selector-pseudo{color:#c792ea;font-style:italic}.hljs-template-tag{color:#c792ea}.hljs-template-variable{color:#addb67}.hljs-addition{color:#addb67ff;font-style:italic}.hljs-deletion{color:#ef535090;font-style:italic}
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>
@@ -1,4 +0,0 @@
1
- declare module '*.md' {
2
- const content: string
3
- export default content
4
- }
@@ -1,6 +0,0 @@
1
- declare module '*.vue' {
2
- import { defineComponent } from 'vue'
3
-
4
- const component: ReturnType<typeof defineComponent>
5
- export default component
6
- }
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "strict": true,
4
- "downlevelIteration": true,
5
- "declaration": true,
6
- "skipLibCheck": true,
7
- "esModuleInterop": true,
8
- "allowJs": true,
9
- "lib": ["esnext", "dom"],
10
- "allowSyntheticDefaultImports": true,
11
- "jsx": "preserve"
12
- }
13
- }
@@ -1,7 +0,0 @@
1
- import type { App } from 'vue'
2
-
3
- export class BasicComponent {
4
- static name: string
5
-
6
- static install(app: App): void
7
- }
@@ -1,12 +0,0 @@
1
- import { BasicComponent } from './basicComponent'
2
-
3
- export interface ButtonProps {
4
- color?: string
5
- onClick?: (e: Event) => void
6
- }
7
-
8
- export class Button extends BasicComponent {
9
- $props: ButtonProps
10
- }
11
-
12
- export class _ButtonComponent extends Button {}
@@ -1,6 +0,0 @@
1
- import type { App } from 'vue'
2
-
3
- export const install: (app: App) => void
4
-
5
- export * from './basicComponent'
6
- export * from './button'
@@ -1,106 +0,0 @@
1
- module.exports = {
2
- name: 'Basic',
3
- namespace: 'b',
4
- title: 'Basic UI',
5
- logo: './logo.svg',
6
- useMobile: true,
7
- themes: {
8
- 'color-body': '#fff',
9
- 'color-bar': '#fff',
10
- 'color-sub-bar': '#f5f5f5',
11
- 'color-text': '#555',
12
- 'color-sub-text': '#888',
13
- 'color-border': 'rgba(0, 0, 0, 0.12)',
14
- 'color-shadow': '#eee',
15
- 'color-introduce-border': '#009688',
16
- 'color-primary': '#009688',
17
- 'color-link': '#009688',
18
- 'color-type': '#009688',
19
- 'color-progress': '#009688',
20
- 'color-progress-track': '#fff',
21
- 'color-side-bar': '#009688',
22
- 'color-side-bar-active-background': '#00968821',
23
- 'color-app-bar': '#009688',
24
- 'color-nav-button-hover-background': 'rgba(0, 0, 0, 0.08)',
25
- 'color-pc-language-active': '#009688',
26
- 'color-pc-language-active-background': '#00968821',
27
- 'color-mobile-language-active': '#009688',
28
- 'color-mobile-language-active-background': '#00968821',
29
- 'color-mobile-cell-hover': '#009688'
30
- },
31
- darkThemes: {
32
- 'color-body': '#121212',
33
- 'color-bar': '#1e1e1e',
34
- 'color-sub-bar': '#272727',
35
- 'color-text': '#fff',
36
- 'color-sub-text': '#aaa',
37
- 'color-border': '#333',
38
- 'color-shadow': '#121212',
39
- 'color-introduce-border': '#555',
40
- 'color-primary': '#009688',
41
- 'color-link': '#009688',
42
- 'color-type': '#009688',
43
- 'color-progress': '#009688',
44
- 'color-progress-track': '#202020',
45
- 'color-side-bar': '#009688',
46
- 'color-side-bar-active-background': '#00968821',
47
- 'color-app-bar': '#009688',
48
- 'color-nav-button-hover-background': 'rgba(255, 255, 255, 0.08)',
49
- 'color-pc-language-active': '#009688',
50
- 'color-pc-language-active-background': '#00968821',
51
- 'color-mobile-language-active': '#009688',
52
- 'color-mobile-language-active-background': '#00968821',
53
- 'color-mobile-cell-hover': '#009688',
54
- },
55
- highlight: {
56
- style: './highlight.css',
57
- },
58
- pc: {
59
- redirect: '/home',
60
- title: {
61
- 'zh-CN': '一个组件库',
62
- },
63
- header: {
64
- i18n: null,
65
- github: 'https://github.com/haoziqaq/varlet',
66
- },
67
- menu: [
68
- {
69
- text: {
70
- 'zh-CN': '开发指南',
71
- },
72
- type: 1,
73
- },
74
- {
75
- text: {
76
- 'zh-CN': '基本介绍',
77
- },
78
- doc: 'home',
79
- type: 3,
80
- },
81
- {
82
- text: {
83
- 'zh-CN': '基础组件',
84
- },
85
- type: 1,
86
- },
87
- {
88
- text: {
89
- 'zh-CN': 'Button 按钮',
90
- },
91
- doc: 'button',
92
- type: 2,
93
- },
94
- ],
95
- },
96
- mobile: {
97
- redirect: '/home',
98
- title: {
99
- 'zh-CN': '一个组件库',
100
- },
101
- header: {
102
- i18n: null,
103
- github: 'https://github.com/haoziqaq/varlet',
104
- },
105
- },
106
- }