@vant/markdown-vetur
Advanced tools
+2
-1
@@ -49,3 +49,3 @@ "use strict"; | ||
| table.body.forEach((line) => { | ||
| const [name, desc, type, defaultVal] = line; | ||
| const [name, desc, type, defaultVal, options] = line; | ||
| tag.attributes.push({ | ||
@@ -55,2 +55,3 @@ name: utils_1.removeVersion(name), | ||
| description: desc, | ||
| options: utils_1.formatOptions(options), | ||
| value: { | ||
@@ -57,0 +58,0 @@ type: utils_1.formatType(type), |
+2
-0
@@ -20,2 +20,3 @@ /// <reference types="node" /> | ||
| description: string; | ||
| options: string[]; | ||
| value: { | ||
@@ -41,2 +42,3 @@ kind: 'expression'; | ||
| description: string; | ||
| options?: string[]; | ||
| }; | ||
@@ -43,0 +45,0 @@ export declare type VeturAttributes = Record<string, VeturAttribute>; |
+1
-0
@@ -5,1 +5,2 @@ export declare function toKebabCase(input: string): string; | ||
| export declare function normalizePath(path: string): string; | ||
| export declare function formatOptions(options?: string): string[]; |
+8
-1
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.normalizePath = exports.formatType = exports.removeVersion = exports.toKebabCase = void 0; | ||
| exports.formatOptions = exports.normalizePath = exports.formatType = exports.removeVersion = exports.toKebabCase = void 0; | ||
| // myName -> my-name | ||
@@ -24,1 +24,8 @@ function toKebabCase(input) { | ||
| exports.normalizePath = normalizePath; | ||
| // `default` `primary` -> ['default', 'primary'] | ||
| function formatOptions(options) { | ||
| if (!options) | ||
| return []; | ||
| return options.replace(/`/g, '').split(' '); | ||
| } | ||
| exports.formatOptions = formatOptions; |
+2
-2
@@ -1,3 +0,3 @@ | ||
| import { VueTag } from './type'; | ||
| import { VueTag, VeturAttribute } from './type'; | ||
| export declare function genVeturTags(tags: VueTag[]): Record<string, import("./type").VeturTag>; | ||
| export declare function genVeturAttributes(tags: VueTag[]): Record<string, import("./type").VeturAttribute>; | ||
| export declare function genVeturAttributes(tags: VueTag[]): Record<string, VeturAttribute>; |
+6
-2
@@ -19,6 +19,10 @@ "use strict"; | ||
| tag.attributes.forEach(attr => { | ||
| veturAttributes[`${tag.name}/${attr.name}`] = { | ||
| let attribute = { | ||
| type: attr.value.type, | ||
| description: `${attr.description}, 默认值: ${attr.default}`, | ||
| description: `${attr.description}, 默认值: ${attr.default}` | ||
| }; | ||
| if (attr.options.length > 0) { | ||
| attribute.options = attr.options; | ||
| } | ||
| veturAttributes[`${tag.name}/${attr.name}`] = attribute; | ||
| }); | ||
@@ -25,0 +29,0 @@ } |
+1
-1
| { | ||
| "name": "@vant/markdown-vetur", | ||
| "version": "2.1.0", | ||
| "version": "2.2.0", | ||
| "description": "simple parse markdown to vue component description for vetur auto-completion", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
14222
4.24%390
4%