@eklingen/vinyl-stream-sass

    4.0.3 • Public • Published

    Small vinyl-stream wrapper -aka Gulp plugin- for sass (dart-sass)

    Run Sass within your streams. This fully supports source maps.

    NOTE: No tests have been written yet!

    Installation

    yarn install. Or npm install. Or just copy the files to your own project.

    Usage

    const sassWrapper = require('@eklingen/vinyl-stream-sass')
    stream.pipe(sassWrapper())

    Options

    There are a few options.

    tryBinary

    Try to compile via the sass binary. Default is true. It tries to use the included binary. With larger .scss files, this method is faster. However, with smaller files, the async overhead might make it slower. In that case, set tryBinary: false. If it can't find the binary for the current architecture, or if there is no result returned, it will try the sass javascript package as a fallback. The sass package is set to optional; make sure to install it manually.

    sassWrapper({
      tryBinary: true
    })

    sass

    These options are passed verbatim into sass. For more information, see the "sass" documentation.

    sassWrapper({
      outputStyle: 'compressed', // or 'extended'
      charset: true,
      errorCss: true,
      sourceMap: true,
      sourceMapContents: true
    })

    Dependencies

    This package requires "sass" and "source-map".


    Copyright (c) 2019 Elco Klingen. MIT License.

    Install

    npm i @eklingen/vinyl-stream-sass

    DownloadsWeekly Downloads

    34

    Version

    4.0.3

    License

    MIT

    Unpacked Size

    79.1 MB

    Total Files

    37

    Last publish

    Collaborators

    • eklingen