{"name":"gulp-sass","version":"0.5.0","description":"Gulp plugin for sass","main":"index.js","scripts":{"test":"node test/test.js"},"repository":{"type":"git","url":"git://github.com/dlmanning/gulp-sass"},"keywords":["gulpplugin","sass","gulp"],"author":{"name":"David Manning"},"license":"MIT","bugs":{"url":"https://github.com/dlmanning/gulp-sass/issues"},"dependencies":{"node-sass":"~0.7.0","gulp-util":"~2.2.5","map-stream":"~0.1.0"},"devDependencies":{"tape":"~2.3.2","concat-stream":"~1.4.1"},"jshintConfig":{"laxcomma":true},"homepage":"https://github.com/dlmanning/gulp-sass","_id":"gulp-sass@0.5.0","dist":{"shasum":"01ea84f2a4cfc35d3c01df05ece7a6b204691bc9","size":3907,"noattachment":false,"tarball":"https://registry.npmmirror.com/gulp-sass/-/gulp-sass-0.5.0.tgz","integrity":"sha512-5aU4fSn32+jU95FVdYDYxC+QK9jlVQay9ABPKuEXP0HnEkAhw0nY3zqa8Tc/oWOnAdrcd0+yrezcqpCHTL8+JA=="},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"dlmanning","email":"dlmanning@me.com"},"maintainers":[{"name":"dlmanning","email":"dlmanning@me.com"},{"name":"snugug","email":"sam@snug.ug"},{"name":"xzyfer","email":"xzyfer@gmail.com"}],"directories":{},"publish_time":1390423967028,"_hasShrinkwrap":false,"_cnpm_publish_time":1390423967028,"_cnpmcore_publish_time":"2021-12-16T11:16:03.230Z","readme":"# gulp-sass ![Build status](https://img.shields.io/travis/dlmanning/gulp-sass) [![Join the chat at https://gitter.im/dlmanning/gulp-sass](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dlmanning/gulp-sass?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ![Node support](https://img.shields.io/node/v/gulp-sass) ![NPM package version](https://img.shields.io/npm/v/gulp-sass?label=npm%20version)\n\nSass plugin for [Gulp](https://github.com/gulpjs/gulp).\n\n**_Before filing an issue, please make sure you have [updated to the latest version of `gulp-sass`](https://github.com/dlmanning/gulp-sass/wiki/Update-to-the-latest-Gulp-Sass) and have gone through our [Common Issues and Their Fixes](https://github.com/dlmanning/gulp-sass/wiki/Common-Issues-and-Their-Fixes) section._**\n\n**Migrating your existing project to version 5? Please read our (short!) [migration guide](#migrating-to-version-5).**\n\n## Support\n\nOnly [Active LTS and Current releases][1] are supported.\n\n[1]: https://github.com/nodejs/Release#release-schedule\n\n## Installation\n\nTo use `gulp-sass`, you must install both `gulp-sass` itself *and* a Sass compiler. `gulp-sass` supports both [Dart Sass][] and [Node Sass][], but Node Sass is [deprecated](https://sass-lang.com/blog/libsass-is-deprecated). We recommend that you use Dart Sass for new projects, and migrate Node Sass projects to Dart Sass when possible.\n\nWhichever compiler you choose, it's best to install these as dev dependencies:\n\n```\nnpm install sass gulp-sass --save-dev\n```\n\n## Usage\n\n**Note:** These examples assume you're using Gulp 4. For examples that work with Gulp 3, [check the docs for an earlier version of `gulp-sass`](https://github.com/dlmanning/gulp-sass/tree/v4.1.1).\n\n`gulp-sass` runs inside of Gulp tasks. No matter what else you do with `gulp-sass`, you must first import it into your gulpfile, making sure to pass it the compiler of your choice. From there, create a Gulp task that calls either `sass()` (to asynchronously render your CSS), or `sass.sync()` (to render it synchronously). Then, export your task with the `export` keyword. We'll show some examples of how to do that.\n\n**⚠️ Note:** With Dart Sass, **synchronous rendering is twice as fast as asynchronous rendering**. The Sass team is exploring ways to improve asynchronous rendering with Dart Sass, but for now you will get the best performance from `sass.sync()`\n\n### Render your CSS\n\nTo render your CSS with a build task, then watch your files for changes, you might write something like this.:\n\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar sass = require('gulp-sass')(require('sass'));\n\nfunction buildStyles() {\n return gulp.src('./sass/**/*.scss')\n .pipe(sass().on('error', sass.logError))\n .pipe(gulp.dest('./css'));\n};\n\nexports.buildStyles = buildStyles;\nexports.watch = function () {\n gulp.watch('./sass/**/*.scss', ['sass']);\n};\n```\n\nWith synchronous rendering, that Gulp task looks like this:\n\n``` javascript\nfunction buildStyles() {\n return gulp.src('./sass/**/*.scss')\n .pipe(sass.sync().on('error', sass.logError))\n .pipe(gulp.dest('./css'));\n};\n```\n\n### Render with options\n\nTo change the final output of your CSS, you can pass an options object to your renderer. `gulp-sass` supports [Node Sass's render options](https://github.com/sass/node-sass#options), with two unsupported exceptions:\n\n- The `data` option, which is used by `gulp-sass` internally.\n- The `file` option, which has undefined behavior that may change without notice.\n\nFor example, to compress your CSS, you can call `sass({outputStyle: 'compressed'}`. In the context of a Gulp task, that looks like this:\n\n```javascript\nfunction buildStyles() {\n return gulp.src('./sass/**/*.scss')\n .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))\n .pipe(gulp.dest('./css'));\n};\n\nexports.buildStyles = buildStyles;\n```\n\nOr this for synchronous rendering:\n\n```javascript\nfunction buildStyles() {\n return gulp.src('./sass/**/*.scss')\n .pipe(sass.sync({outputStyle: 'compressed'}).on('error', sass.logError))\n .pipe(gulp.dest('./css'));\n};\n\nexports.buildStyles = buildStyles;\n```\n\n### Include a source map\n\n`gulp-sass` can be used in tandem with [`gulp-sourcemaps`](https://github.com/floridoo/gulp-sourcemaps) to generate source maps for the Sass-to-CSS compilation. You will need to initialize `gulp-sourcemaps` _before_ running `gulp-sass`, and write the source maps after.\n\n```javascript\nvar sourcemaps = require('gulp-sourcemaps');\n\nfunction buildStyles() {\n return gulp.src('./sass/**/*.scss')\n .pipe(sourcemaps.init())\n .pipe(sass().on('error', sass.logError))\n .pipe(sourcemaps.write())\n .pipe(gulp.dest('./css'));\n}\n\nexports.buildStyles = buildStyles;\n```\n\nBy default, `gulp-sourcemaps` writes the source maps inline, in the compiled CSS files. To write them to a separate file, specify a path relative to the `gulp.dest()` destination in the `sourcemaps.write()` function.\n\n```javascript\nvar sourcemaps = require('gulp-sourcemaps');\n\nfunction buildStyles() {\n return gulp.src('./sass/**/*.scss')\n .pipe(sourcemaps.init())\n .pipe(sass().on('error', sass.logError))\n .pipe(sourcemaps.write('./maps'))\n .pipe(gulp.dest('./css'));\n};\n\nexports.buildStyles = buildStyles;\n```\n\n