{"id":21531459,"url":"https://github.com/kasperhesthaven/gulp-dart-scss","last_synced_at":"2025-04-10T00:27:00.155Z","repository":{"id":35143887,"uuid":"212477184","full_name":"kasperhesthaven/gulp-dart-scss","owner":"kasperhesthaven","description":"Gulp plugin to compile Sass using the Dart Sass compiler.","archived":false,"fork":false,"pushed_at":"2023-02-20T19:56:39.000Z","size":34,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T02:11:29.299Z","etag":null,"topics":["dart","dart-sass","dart-sass-compiler","gulp-plugin","gulp4","scss"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kasperhesthaven.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-03T01:44:08.000Z","updated_at":"2022-01-18T06:30:50.000Z","dependencies_parsed_at":"2024-06-19T14:34:10.120Z","dependency_job_id":"9239fcab-3bb6-4b2c-b4ec-0720005c366b","html_url":"https://github.com/kasperhesthaven/gulp-dart-scss","commit_stats":{"total_commits":27,"total_committers":3,"mean_commits":9.0,"dds":0.5185185185185186,"last_synced_commit":"8d37f108910094ada4ddd2fe73cd338564999a7a"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasperhesthaven%2Fgulp-dart-scss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasperhesthaven%2Fgulp-dart-scss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasperhesthaven%2Fgulp-dart-scss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasperhesthaven%2Fgulp-dart-scss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kasperhesthaven","download_url":"https://codeload.github.com/kasperhesthaven/gulp-dart-scss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801155,"owners_count":20998338,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","dart-sass","dart-sass-compiler","gulp-plugin","gulp4","scss"],"created_at":"2024-11-24T02:14:00.018Z","updated_at":"2025-04-10T00:27:00.127Z","avatar_url":"https://github.com/kasperhesthaven.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![NPM CD](https://github.com/kasperhesthaven/gulp-dart-scss/workflows/NPM%20CD/badge.svg) ![Dependencies](https://img.shields.io/librariesio/release/npm/gulp-dart-scss) ![NPM Version](https://img.shields.io/npm/v/gulp-dart-scss)\n\n# gulp-dart-scss\n\nGulp plugin to compile Sass (.scss) to CSS using the [Dart Sass compiler](https://github.com/sass/dart-sass).\n\n\u003e Made to work with latest version of the JavaScript based compiler.\n\n## Install\n\n`npm i gulp-dart-scss`\n\n## Usage\n\n```js\nconst gulp = require(\"gulp\");\nconst scss = require(\"gulp-dart-scss\");\n\nexport function compileScss() {\n  return gulp\n    .src(\"./src/main.scss\")\n    .pipe(\n      scss({\n        // Optional option object - See below or sass for API\n      })\n    )\n    .pipe(gulp.dest(\"./dist/css\"));\n}\n```\n\n## Options\n\nFrom [node-sass](https://github.com/sass/node-sass/)\n\n### file\n\n- Type: `String`\n- Default: `null`\n\n**Special**: `file` or `data` must be specified\n\nPath to a file for [LibSass] to compile.\n\n### data\n\n- Type: `String`\n- Default: `null`\n\n**Special**: `file` or `data` must be specified\n\nA string to pass to [LibSass] to compile. It is recommended that you use `includePaths` in conjunction with this so that [LibSass] can find files when using the `@import` directive.\n\n### importer (\u003e= v2.0.0) - _experimental_\n\n**This is an experimental LibSass feature. Use with caution.**\n\n- Type: `Function | Function[]` signature `function(url, prev, done)`\n- Default: `undefined`\n\nFunction Parameters and Information:\n\n- `url (String)` - the path in import **as-is**, which [LibSass] encountered\n- `prev (String)` - the previously resolved path\n- `done (Function)` - a callback function to invoke on async completion, takes an object literal containing\n  - `file (String)` - an alternate path for [LibSass] to use **OR**\n  - `contents (String)` - the imported contents (for example, read from memory or the file system)\n\nHandles when [LibSass] encounters the `@import` directive. A custom importer allows extension of the [LibSass] engine in both a synchronous and asynchronous manner. In both cases, the goal is to either `return` or call `done()` with an object literal. Depending on the value of the object literal, one of two things will happen.\n\nWhen returning or calling `done()` with `{ file: \"String\" }`, the new file path will be assumed for the `@import`. It's recommended to be mindful of the value of `prev` in instances where relative path resolution may be required.\n\nWhen returning or calling `done()` with `{ contents: \"String\" }`, the string value will be used as if the file was read in through an external source.\n\nStarting from v3.0.0:\n\n- `this` refers to a contextual scope for the immediate run of `sass.render` or `sass.renderSync`\n\n- importers can return error and LibSass will emit that error in response. For instance:\n\n  ```javascript\n  done(new Error(\"doesn't exist!\"));\n  // or return synchronously\n  return new Error(\"nothing to do here\");\n  ```\n\n- importer can be an array of functions, which will be called by LibSass in the order of their occurrence in array. This helps user specify special importer for particular kind of path (filesystem, http). If an importer does not want to handle a particular path, it should return `null`. See [functions section](#functions--v300---experimental) for more details on Sass types.\n\n### functions (\u003e= v3.0.0) - _experimental_\n\n**This is an experimental LibSass feature. Use with caution.**\n\n`functions` is an `Object` that holds a collection of custom functions that may be invoked by the sass files being compiled. They may take zero or more input parameters and must return a value either synchronously (`return ...;`) or asynchronously (`done();`). Those parameters will be instances of one of the constructors contained in the `require('node-sass').types` hash. The return value must be of one of these types as well. See the list of available types below:\n\n#### types.Number(value [, unit = \"\"])\n\n- `getValue()`/ `setValue(value)` : gets / sets the numerical portion of the number\n- `getUnit()` / `setUnit(unit)` : gets / sets the unit portion of the number\n\n#### types.String(value)\n\n- `getValue()` / `setValue(value)` : gets / sets the enclosed string\n\n#### types.Color(r, g, b [, a = 1.0]) or types.Color(argb)\n\n- `getR()` / `setR(value)` : red component (integer from `0` to `255`)\n- `getG()` / `setG(value)` : green component (integer from `0` to `255`)\n- `getB()` / `setB(value)` : blue component (integer from `0` to `255`)\n- `getA()` / `setA(value)` : alpha component (number from `0` to `1.0`)\n\nExample:\n\n```javascript\nvar Color = require(\"node-sass\").types.Color,\n  c1 = new Color(255, 0, 0),\n  c2 = new Color(0xff0088cc);\n```\n\n#### types.Boolean(value)\n\n- `getValue()` : gets the enclosed boolean\n- `types.Boolean.TRUE` : Singleton instance of `types.Boolean` that holds \"true\"\n- `types.Boolean.FALSE` : Singleton instance of `types.Boolean` that holds \"false\"\n\n#### types.List(length [, commaSeparator = true])\n\n- `getValue(index)` / `setValue(index, value)` : `value` must itself be an instance of one of the constructors in `sass.types`.\n- `getSeparator()` / `setSeparator(isComma)` : whether to use commas as a separator\n- `getLength()`\n\n#### types.Map(length)\n\n- `getKey(index)` / `setKey(index, value)`\n- `getValue(index)` / `setValue(index, value)`\n- `getLength()`\n\n#### types.Null()\n\n- `types.Null.NULL` : Singleton instance of `types.Null`.\n\n#### Example\n\n```javascript\nsass.renderSync({\n  data: \"#{headings(2,5)} { color: #08c; }\",\n  functions: {\n    \"headings($from: 0, $to: 6)\": function (from, to) {\n      var i,\n        f = from.getValue(),\n        t = to.getValue(),\n        list = new sass.types.List(t - f + 1);\n\n      for (i = f; i \u003c= t; i++) {\n        list.setValue(i - f, new sass.types.String(\"h\" + i));\n      }\n\n      return list;\n    },\n  },\n});\n```\n\n### includePaths\n\n- Type: `Array\u003cString\u003e`\n- Default: `[]`\n\nAn array of paths that [LibSass] can look in to attempt to resolve your `@import` declarations. When using `data`, it is recommended that you use this.\n\n### indentedSyntax\n\n- Type: `Boolean`\n- Default: `false`\n\n`true` values enable [Sass Indented Syntax](https://sass-lang.com/documentation/file.INDENTED_SYNTAX.html) for parsing the data string or file.\n\n**Note:** node-sass/libsass will compile a mixed library of scss and indented syntax (.sass) files with the Default setting (false) as long as .sass and .scss extensions are used in filenames.\n\n### indentType (\u003e= v3.0.0)\n\n- Type: `String`\n- Default: `space`\n\nUsed to determine whether to use space or tab character for indentation.\n\n### indentWidth (\u003e= v3.0.0)\n\n- Type: `Number`\n- Default: `2`\n- Maximum: `10`\n\nUsed to determine the number of spaces or tabs to be used for indentation.\n\n### linefeed (\u003e= v3.0.0)\n\n- Type: `String`\n- Default: `lf`\n\nUsed to determine whether to use `cr`, `crlf`, `lf` or `lfcr` sequence for line break.\n\n### omitSourceMapUrl\n\n- Type: `Boolean`\n- Default: `false`\n\n**Special:** When using this, you should also specify `outFile` to avoid unexpected behavior.\n\n`true` values disable the inclusion of source map information in the output file.\n\n### outFile\n\n- Type: `String | null`\n- Default: `null`\n\n**Special:** Required when `sourceMap` is a truthy value\n\nSpecify the intended location of the output file. Strongly recommended when outputting source maps so that they can properly refer back to their intended files.\n\n**Attention** enabling this option will **not** write the file on disk for you, it's for internal reference purpose only (to generate the map for example).\n\nExample on how to write it on the disk\n\n```javascript\nsass.render({\n    ...\n    outFile: yourPathTotheFile,\n  }, function(error, result) { // node-style callback from v3.0.0 onwards\n    if(!error){\n      // No errors during the compilation, write this result on the disk\n      fs.writeFile(yourPathTotheFile, result.css, function(err){\n        if(!err){\n          //file written on disk\n        }\n      });\n    }\n  });\n});\n```\n\n### outputStyle\n\n- Type: `String`\n- Default: `nested`\n- Values: `nested`, `expanded`, `compact`, `compressed`\n\nDetermines the output format of the final CSS style.\n\n### precision\n\n- Type: `Integer`\n- Default: `5`\n\nUsed to determine how many digits after the decimal will be allowed. For instance, if you had a decimal number of `1.23456789` and a precision of `5`, the result will be `1.23457` in the final CSS.\n\n### sourceComments\n\n- Type: `Boolean`\n- Default: `false`\n\n`true` Enables the line number and file where a selector is defined to be emitted into the compiled CSS as a comment. Useful for debugging, especially when using imports and mixins.\n\n### sourceMap\n\n- Type: `Boolean | String | undefined`\n- Default: `undefined`\n\nEnables source map generation during `render` and `renderSync`.\n\nWhen `sourceMap === true`, the value of `outFile` is used as the target output location for the source map with the suffix `.map` appended. If no `outFile` is set, `sourceMap` parameter is ignored.\n\nWhen `typeof sourceMap === \"string\"`, the value of `sourceMap` will be used as the writing location for the file.\n\n### sourceMapContents\n\n- Type: `Boolean`\n- Default: `false`\n\n`true` includes the `contents` in the source map information\n\n### sourceMapEmbed\n\n- Type: `Boolean`\n- Default: `false`\n\n`true` embeds the source map as a data URI\n\n### sourceMapRoot\n\n- Type: `String`\n- Default: `undefined`\n\nthe value will be emitted as `sourceRoot` in the source map information\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasperhesthaven%2Fgulp-dart-scss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkasperhesthaven%2Fgulp-dart-scss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasperhesthaven%2Fgulp-dart-scss/lists"}