Home / File/ compileStyle.ts — vue Source File

compileStyle.ts — vue Source File

Architecture documentation for compileStyle.ts, a typescript file in the vue codebase. 11 imports, 2 dependents.

File typescript SfcCompiler ScriptCompiler 11 imports 2 dependents 4 functions

Entity Profile

Dependency Diagram

graph LR
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c["compileStyle.ts"]
  49e03676_84c9_6dfa_51b3_0ac2412686d2["trim.ts"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> 49e03676_84c9_6dfa_51b3_0ac2412686d2
  1b5c1ba8_1851_1f8d_73f6_525738014182["trimPlugin"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> 1b5c1ba8_1851_1f8d_73f6_525738014182
  822b2e28_d690_8f44_42af_ffc75c6a194a["scoped.ts"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> 822b2e28_d690_8f44_42af_ffc75c6a194a
  d86bae84_10d8_7bbb_4a04_234c48dfb075["scopedPlugin"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> d86bae84_10d8_7bbb_4a04_234c48dfb075
  ba46daf5_ee23_b1e3_6003_bd7f1eb01c21["stylePreprocessors.ts"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> ba46daf5_ee23_b1e3_6003_bd7f1eb01c21
  202b0510_16a6_6a6b_9b5e_de644b2a48a7["StylePreprocessor"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> 202b0510_16a6_6a6b_9b5e_de644b2a48a7
  63f5ac6c_5559_a474_3469_81c5466cd0ce["StylePreprocessorResults"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> 63f5ac6c_5559_a474_3469_81c5466cd0ce
  e9d092dc_1e1a_5490_729c_908f9bdca519["StylePreprocessorResults"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> e9d092dc_1e1a_5490_729c_908f9bdca519
  445bc304_0400_2ae2_a33b_eaa1d5e1788a["cssVars.ts"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> 445bc304_0400_2ae2_a33b_eaa1d5e1788a
  96711959_2cc0_7721_49fa_91560867d8c7["cssVarsPlugin"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> 96711959_2cc0_7721_49fa_91560867d8c7
  1aa815c2_41ad_6268_0ebd_effb0617ac66["postcss"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> 1aa815c2_41ad_6268_0ebd_effb0617ac66
  da888724_2f5b_ce7b_dcaa_5217227b58e9["compileStyle.spec.ts"]
  da888724_2f5b_ce7b_dcaa_5217227b58e9 --> 1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c
  356a57c1_72c1_03b6_ea6a_d5b2aeea245d["stylePluginScoped.spec.ts"]
  356a57c1_72c1_03b6_ea6a_d5b2aeea245d --> 1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c
  style 1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

const postcss = require('postcss')
import { ProcessOptions, LazyResult } from 'postcss'
import trimPlugin from './stylePlugins/trim'
import scopedPlugin from './stylePlugins/scoped'
import {
  processors,
  StylePreprocessor,
  StylePreprocessorResults
} from './stylePreprocessors'
import { cssVarsPlugin } from './cssVars'

export interface SFCStyleCompileOptions {
  source: string
  filename: string
  id: string
  map?: any
  scoped?: boolean
  trim?: boolean
  preprocessLang?: string
  preprocessOptions?: any
  postcssOptions?: any
  postcssPlugins?: any[]
  isProd?: boolean
}

export interface SFCAsyncStyleCompileOptions extends SFCStyleCompileOptions {
  isAsync?: boolean
}

export interface SFCStyleCompileResults {
  code: string
  map: any | void
  rawResult: LazyResult | void
  errors: string[]
}

export function compileStyle(
  options: SFCStyleCompileOptions
): SFCStyleCompileResults {
  return doCompileStyle({ ...options, isAsync: false })
}

export function compileStyleAsync(
  options: SFCStyleCompileOptions
): Promise<SFCStyleCompileResults> {
  return Promise.resolve(doCompileStyle({ ...options, isAsync: true }))
}

export function doCompileStyle(
  options: SFCAsyncStyleCompileOptions
): SFCStyleCompileResults {
  const {
    filename,
    id,
    scoped = true,
    trim = true,
    isProd = false,
    preprocessLang,
    postcssOptions,
    postcssPlugins
// ... (88 more lines)

Domain

Subdomains

Frequently Asked Questions

What does compileStyle.ts do?
compileStyle.ts is a source file in the vue codebase, written in typescript. It belongs to the SfcCompiler domain, ScriptCompiler subdomain.
What functions are defined in compileStyle.ts?
compileStyle.ts defines 4 function(s): compileStyle, compileStyleAsync, doCompileStyle, preprocess.
What does compileStyle.ts depend on?
compileStyle.ts imports 11 module(s): StylePreprocessor, StylePreprocessorResults, StylePreprocessorResults, cssVars.ts, cssVarsPlugin, postcss, scoped.ts, scopedPlugin, and 3 more.
What files import compileStyle.ts?
compileStyle.ts is imported by 2 file(s): compileStyle.spec.ts, stylePluginScoped.spec.ts.
Where is compileStyle.ts in the architecture?
compileStyle.ts is located at packages/compiler-sfc/src/compileStyle.ts (domain: SfcCompiler, subdomain: ScriptCompiler, directory: packages/compiler-sfc/src).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free