Spec-Zone.ru › Sass

Compiler

The result of creating a synchronous compiler. Returned by initCompiler.

Hierarchy

  • Compiler
  • Defined in js-api-doc/compile.d.ts:46
Index

Constructors

constructor

Methods

compile compileString dispose

Constructors

Private constructor

  • new Compiler(): Compiler
  • Throws an error if constructed directly, instead of via initCompiler.

    Returns Compiler

    • Defined in js-api-doc/compile.d.ts:51

Methods

compile

  • compile(path: string, options?: Options<"sync">): CompileResult
  • The compile method exposed through a Compiler instance while it is active. If this is called after dispose on the Compiler instance, an error will be thrown.

    During the Compiler instance's lifespan, given the same input, this will return an identical result to the compile method exposed at the module root.

    Parameters

    • path: string
    • Optional options: Options<"sync">

    Returns CompileResult

    • Defined in js-api-doc/compile.d.ts:62

compileString

  • compileString(source: string, options?: StringOptions<"sync">): CompileResult
  • The compileString method exposed through a Compiler instance while it is active. If this is called after dispose on the Compiler instance, an error will be thrown.

    During the Compiler instance's lifespan, given the same input, this will return an identical result to the compileString method exposed at the module root.

    Parameters

    • source: string
    • Optional options: StringOptions<"sync">

    Returns CompileResult

    • Defined in js-api-doc/compile.d.ts:73

dispose

  • dispose(): void
  • Ends the lifespan of this Compiler instance. After this is invoked, all calls to the Compiler instance's compile or compileString methods will result in an error.

    Returns void

    • Defined in js-api-doc/compile.d.ts:80
sass
  • Compile
    • AsyncCompiler
    • Compiler
    • CompileResult
    • compile
    • compileAsync
    • compileString
    • compileStringAsync
    • initAsyncCompiler
    • initCompiler
  • Options
    • Options
    • StringOptions
    • OutputStyle
    • StringOptionsWithImporter
    • StringOptionsWithoutImporter
    • Syntax
  • Logger
    • Logger
      • silent
    • Logger
    • SourceLocation
    • SourceSpan
    • LoggerWarnOptions
  • Importer
    • NodePackageImporter
    • FileImporter
    • Importer
    • ImporterResult
  • Custom Function
    • CalculationInterpolation
    • CalculationOperation
    • SassArgumentList
    • SassBoolean
    • SassCalculation
    • SassColor
    • SassFunction
    • SassList
    • SassMap
    • SassMixin
    • SassNumber
    • SassString
    • Value
    • CalculationOperator
    • CalculationValue
    • CustomFunction
    • ListSeparator
    • sassFalse
    • sassNull
    • sassTrue
  • Other
    • Exception
    • CanonicalizeContext
    • Deprecations
    • LegacyFileOptions
    • ChannelName
    • ChannelNameHsl
    • ChannelNameHwb
    • ChannelNameLab
    • ChannelNameLch
    • ChannelNameRgb
    • ChannelNameXyz
    • ColorSpaceHsl
    • ColorSpaceHwb
    • ColorSpaceLab
    • ColorSpaceLch
    • ColorSpaceRgb
    • ColorSpaceXyz
    • GamutMapMethod
    • HueInterpolationMethod
    • KnownColorSpace
    • PolarColorSpace
    • PromiseOr
    • RectangularColorSpace
    • info
  • Legacy
    • types
      • Boolean
      • Color
      • Error
      • List
      • Map
      • Null
      • Number
      • String
    • LegacyException
    • LegacyImporterThis
    • LegacyPluginThis
    • LegacyResult
    • LegacySharedOptions
    • LegacyStringOptions
    • LegacyAsyncFunction
    • LegacyAsyncFunctionDone
    • LegacyAsyncImporter
    • LegacyFunction
    • LegacyImporter
    • LegacyImporterResult
    • LegacyOptions
    • LegacySyncFunction
    • LegacySyncImporter
    • LegacyValue
    • FALSE
    • NULL
    • TRUE
    • render
    • renderSync
  • Messages
    • Version
    • Deprecation
    • DeprecationOrId
    • DeprecationStatus
    • deprecations

© 2006–2025 the Sass team, and numerous contributors
Licensed under the MIT License.
https://sass-lang.com/documentation/js-api/classes/Compiler

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API