@vue/component-compiler-utils

  • Version 3.3.0
  • Published
  • 65.8 kB
  • 9 dependencies
  • MIT license

Install

npm i @vue/component-compiler-utils
yarn add @vue/component-compiler-utils
pnpm add @vue/component-compiler-utils

Overview

Lower level utilities for compiling Vue single file components

Index

Functions

function compileStyle

compileStyle: (options: StyleCompileOptions) => StyleCompileResults;

    function compileStyleAsync

    compileStyleAsync: (
    options: StyleCompileOptions
    ) => Promise<StyleCompileResults>;

      function compileTemplate

      compileTemplate: (options: TemplateCompileOptions) => TemplateCompileResult;

        function parse

        parse: (options: ParseOptions) => SFCDescriptor;

          Interfaces

          interface SFCBlock

          interface SFCBlock extends SFCCustomBlock {}

            property lang

            lang?: string;

              property module

              module?: string | boolean;

                property scoped

                scoped?: boolean;

                  property src

                  src?: string;

                    interface SFCCustomBlock

                    interface SFCCustomBlock {}

                      property attrs

                      attrs: {
                      [key: string]: string | true;
                      };

                        property content

                        content: string;

                          property end

                          end: number;

                            property map

                            map?: RawSourceMap;

                              property start

                              start: number;

                                property type

                                type: string;

                                  interface SFCDescriptor

                                  interface SFCDescriptor {}

                                    property customBlocks

                                    customBlocks: SFCCustomBlock[];

                                      property script

                                      script: SFCBlock | null;

                                        property styles

                                        styles: SFCBlock[];

                                          property template

                                          template: SFCBlock | null;

                                            interface StyleCompileOptions

                                            interface StyleCompileOptions {}

                                              property filename

                                              filename: string;

                                                property id

                                                id: string;

                                                  property map

                                                  map?: any;

                                                    property postcssOptions

                                                    postcssOptions?: any;

                                                      property postcssPlugins

                                                      postcssPlugins?: any[];

                                                        property preprocessLang

                                                        preprocessLang?: string;

                                                          property preprocessOptions

                                                          preprocessOptions?: any;

                                                            property scoped

                                                            scoped?: boolean;

                                                              property source

                                                              source: string;

                                                                property trim

                                                                trim?: boolean;

                                                                  interface StyleCompileResults

                                                                  interface StyleCompileResults {}

                                                                    property code

                                                                    code: string;

                                                                      property errors

                                                                      errors: string[];

                                                                        property map

                                                                        map: any | void;

                                                                          property rawResult

                                                                          rawResult: LazyResult | void;

                                                                            interface TemplateCompileOptions

                                                                            interface TemplateCompileOptions {}

                                                                              property compiler

                                                                              compiler: VueTemplateCompiler;

                                                                                property compilerOptions

                                                                                compilerOptions?: VueTemplateCompilerOptions;

                                                                                  property filename

                                                                                  filename: string;

                                                                                    property isFunctional

                                                                                    isFunctional?: boolean;

                                                                                      property isProduction

                                                                                      isProduction?: boolean;

                                                                                        property optimizeSSR

                                                                                        optimizeSSR?: boolean;

                                                                                          property preprocessLang

                                                                                          preprocessLang?: string;

                                                                                            property preprocessOptions

                                                                                            preprocessOptions?: any;

                                                                                              property prettify

                                                                                              prettify?: boolean;

                                                                                                property source

                                                                                                source: string;

                                                                                                  property transformAssetUrls

                                                                                                  transformAssetUrls?: AssetURLOptions | boolean;

                                                                                                    property transformAssetUrlsOptions

                                                                                                    transformAssetUrlsOptions?: TransformAssetUrlsOptions;

                                                                                                      property transpileOptions

                                                                                                      transpileOptions?: any;

                                                                                                        interface TemplateCompileResult

                                                                                                        interface TemplateCompileResult {}

                                                                                                          property ast

                                                                                                          ast: Object | undefined;

                                                                                                            property code

                                                                                                            code: string;

                                                                                                              property errors

                                                                                                              errors: (string | ErrorWithRange)[];

                                                                                                                property source

                                                                                                                source: string;

                                                                                                                  property tips

                                                                                                                  tips: (string | ErrorWithRange)[];

                                                                                                                    Package Files (4)

                                                                                                                    Dependencies (9)

                                                                                                                    Dev Dependencies (14)

                                                                                                                    Peer Dependencies (0)

                                                                                                                    No peer dependencies.

                                                                                                                    Badge

                                                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@vue/component-compiler-utils.

                                                                                                                    • Markdown
                                                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@vue/component-compiler-utils)
                                                                                                                    • HTML
                                                                                                                      <a href="https://www.jsdocs.io/package/@vue/component-compiler-utils"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>