vue-tsc 3.2.4 → 3.2.6

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 (2) hide show
  1. package/README.md +68 -8
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,17 +1,77 @@
1
1
  # vue-tsc
2
2
 
3
- Vue 3 command line Type-Checking tool.
3
+ <p>
4
+ <a href="https://www.npmjs.com/package/vue-tsc"><img src="https://img.shields.io/npm/v/vue-tsc.svg?labelColor=18181B&color=1584FC" alt="NPM version"></a>
5
+ <a href="https://github.com/vuejs/language-tools/blob/master/LICENSE"><img src="https://img.shields.io/github/license/vuejs/language-tools.svg?labelColor=18181B&color=1584FC" alt="License"></a>
6
+ </p>
7
+
8
+ A command-line type checking tool for Vue, based on a `tsc` wrapper, enabling the TypeScript compiler to understand `.vue` files.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install vue-tsc typescript --save-dev
14
+ ```
15
+
16
+ Requires TypeScript 5.0.0 or higher.
4
17
 
5
18
  ## Usage
6
19
 
7
- Type check:
20
+ ### Type Checking
21
+
22
+ ```bash
23
+ vue-tsc --noEmit
24
+ ```
25
+
26
+ ### Generate Declaration Files
27
+
28
+ ```bash
29
+ vue-tsc --declaration --emitDeclarationOnly
30
+ ```
31
+
32
+ ### Configuration in package.json
33
+
34
+ ```json
35
+ {
36
+ "scripts": {
37
+ "type-check": "vue-tsc --noEmit",
38
+ "build:types": "vue-tsc --declaration --emitDeclarationOnly"
39
+ }
40
+ }
41
+ ```
42
+
43
+ ## Supported File Types
44
+
45
+ `vue-tsc` automatically reads file types to process from `vueCompilerOptions.extensions` in `tsconfig.json`, defaulting to `['.vue']`.
46
+
47
+ If `vitePressExtensions` or `petiteVueExtensions` are configured, those extensions will also be processed.
48
+
49
+ ## Differences from tsc
50
+
51
+ `vue-tsc` is a wrapper around `tsc` that:
52
+
53
+ 1. Reads `vueCompilerOptions` from `tsconfig.json`
54
+ 2. Creates a Vue language plugin to process `.vue` files
55
+ 3. Transforms `.vue` files into TypeScript virtual code before passing them to `tsc`
56
+
57
+ All `tsc` command-line arguments can be used directly.
58
+
59
+ ## Programmatic Usage
60
+
61
+ ```typescript
62
+ import { run } from 'vue-tsc';
63
+
64
+ // Use the default tsc path
65
+ run();
66
+
67
+ // Specify a custom tsc path
68
+ run('/path/to/typescript/lib/tsc.js');
69
+ ```
8
70
 
9
- `vue-tsc --noEmit`
71
+ ## Related Packages
10
72
 
11
- Build dts:
73
+ - [`@vue/language-core`](../language-core) - Core module
12
74
 
13
- `vue-tsc --declaration --emitDeclarationOnly`
75
+ ## License
14
76
 
15
- Check out [vue-tsc-component-library-example](https://www.npmjs.com/package/@3nuc/vue-tsc-component-library-example?activeTab=code)
16
- ([Repo Archive](https://web.archive.org/web/20220315023520/https://github.com/sethidden/vue-tsc-component-library-example))
17
- for the example repo.
77
+ [MIT](https://github.com/vuejs/language-tools/blob/master/LICENSE) License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-tsc",
3
- "version": "3.2.4",
3
+ "version": "3.2.6",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "bin",
@@ -20,11 +20,11 @@
20
20
  "typescript": ">=5.0.0"
21
21
  },
22
22
  "dependencies": {
23
- "@volar/typescript": "2.4.27",
24
- "@vue/language-core": "3.2.4"
23
+ "@volar/typescript": "2.4.28",
24
+ "@vue/language-core": "3.2.6"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^22.10.4"
28
28
  },
29
- "gitHead": "f0ede303fadb192a59068b4b667b0405523d24c8"
29
+ "gitHead": "94907be4f056f25867e46a117ab18d2782b425d7"
30
30
  }