@vtj/parser 0.10.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.
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@vtj/parser",
3
+ "private": false,
4
+ "version": "0.10.0",
5
+ "type": "module",
6
+ "dependencies": {
7
+ "@babel/generator": "~7.26.8",
8
+ "@babel/parser": "~7.26.8",
9
+ "@babel/traverse": "~7.26.8",
10
+ "@vue/compiler-dom": "~3.5.13",
11
+ "@vue/compiler-sfc": "~3.5.13",
12
+ "@vtj/base": "~0.10.0",
13
+ "@vtj/coder": "~0.10.0",
14
+ "@vtj/core": "~0.10.0"
15
+ },
16
+ "devDependencies": {
17
+ "@vtj/cli": "~0.10.0"
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "types": "./types/index.d.ts",
22
+ "import": "./dist/index.mjs",
23
+ "require": "./dist/index.cjs"
24
+ }
25
+ },
26
+ "main": "./dist/index.cjs",
27
+ "module": "./dist/index.mjs",
28
+ "types": "./types/index.d.ts",
29
+ "files": [
30
+ "dist",
31
+ "types"
32
+ ],
33
+ "gitHead": "d03843144f07c2d98c1e0c72c8c6eb1117c01722",
34
+ "publishConfig": {
35
+ "access": "public"
36
+ },
37
+ "scripts": {
38
+ "build": "vue-tsc && vite build",
39
+ "test": "vitest run",
40
+ "vitest": "vitest",
41
+ "coverage": "vitest run --coverage"
42
+ }
43
+ }
@@ -0,0 +1,2 @@
1
+ export { version as VTJ_PARSER_VERSION } from './version';
2
+ export * from './uni';
@@ -0,0 +1 @@
1
+ export * from './utils';
@@ -0,0 +1,11 @@
1
+ import { Node, File } from '@babel/types';
2
+ import { TraverseOptions } from '@babel/traverse';
3
+ import { ParseResult } from '@babel/parser';
4
+ export declare function parseSFC(source: string): {
5
+ template: string;
6
+ script: string;
7
+ styles: string[];
8
+ };
9
+ export declare function parseScript(script: string): ParseResult<File>;
10
+ export declare function traverseAST(ast: ReturnType<typeof parseScript>, options: TraverseOptions): void;
11
+ export declare function generateCode(node: Node): string;
@@ -0,0 +1 @@
1
+ export declare function parseUniApp(source: string): Record<string, any>;
@@ -0,0 +1 @@
1
+ export * from './app';
@@ -0,0 +1,8 @@
1
+ /**!
2
+ * Copyright (c) 2025, VTJ.PRO All rights reserved.
3
+ * @name @vtj/parser
4
+ * @author CHC chenhuachun1549@dingtalk.com
5
+ * @version 0.9.25
6
+ * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
+ */
8
+ export declare const version = "0.9.25";