Home / File/ trim.ts — vue Source File

trim.ts — vue Source File

Architecture documentation for trim.ts, a typescript file in the vue codebase. 1 imports, 1 dependents.

File typescript SfcCompiler ScriptCompiler 1 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  49e03676_84c9_6dfa_51b3_0ac2412686d2["trim.ts"]
  1aa815c2_41ad_6268_0ebd_effb0617ac66["postcss"]
  49e03676_84c9_6dfa_51b3_0ac2412686d2 --> 1aa815c2_41ad_6268_0ebd_effb0617ac66
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c["compileStyle.ts"]
  1aad1b66_4ff0_fcc3_9eab_fd33ebad4a4c --> 49e03676_84c9_6dfa_51b3_0ac2412686d2
  style 49e03676_84c9_6dfa_51b3_0ac2412686d2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { PluginCreator } from 'postcss'

const trimPlugin: PluginCreator<{}> = () => {
  return {
    postcssPlugin: 'vue-sfc-trim',
    Once(root) {
      root.walk(({ type, raws }) => {
        if (type === 'rule' || type === 'atrule') {
          if (raws.before) raws.before = '\n'
          if ('after' in raws && raws.after) raws.after = '\n'
        }
      })
    }
  }
}

trimPlugin.postcss = true
export default trimPlugin

Domain

Subdomains

Functions

Dependencies

  • postcss

Frequently Asked Questions

What does trim.ts do?
trim.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 trim.ts?
trim.ts defines 1 function(s): trimPlugin.
What does trim.ts depend on?
trim.ts imports 1 module(s): postcss.
What files import trim.ts?
trim.ts is imported by 1 file(s): compileStyle.ts.
Where is trim.ts in the architecture?
trim.ts is located at packages/compiler-sfc/src/stylePlugins/trim.ts (domain: SfcCompiler, subdomain: ScriptCompiler, directory: packages/compiler-sfc/src/stylePlugins).

Analyze Your Own Codebase

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

Try Supermodel Free