Vue Language Tools

repository·master·Indexed 27 days ago

https://github.com/vuejs/language-tools

A high-performance Vue language toolset based on Volar.js providing SFC parsing, type-checking, and language server support. Includes the Vue (Official) VSCode extension, @vue/language-core for SFC transformation, vue-component-meta for static metadata extraction, and vue-component-type-helpers for TypeScript utility types.

Tokens
25K
Snippets
56
Records
201
Agent score
92%

What's inside vuejs-language-tools

  1. Overview of Vue Language Tools packages

    master

    The Vue Language Tools repository is organized into several packages depending on your use case:

    For End Users

    • Vue (Official): VSCode extension for Vue, Vitepress, and petite-vue support.
    • vue-tsc: CLI tool for type-checking and dts builds.

    For Editor Integration

    • @vue/language-server: The core language server.
    • @vue/language-service: A collection of language service plugins.
    • @vue/typescript-plugin: A plugin for the TypeScript language service.

    Core & Helpers

    • @vue/language-core: Handles SFC parsing and virtual code generation.
    • vue-component-meta: Extracts type information for component props, events, and slots.
    • vue-component-type-helpers: Utilities for component types.
    • @vue/language-plugin-pug: Support for Pug templates.
  2. Set up command-line type checking with vue-tsc

    master

    To perform type-checking and build .d.ts files from the command line, install vue-tsc and typescript as development dependencies. You can then add a script to your package.json to run the type-check without emitting files.

    npm install vue-tsc typescript --save-dev
    {
      "scripts": {
        "type-check": "vue-tsc --noEmit"
      }
    }