{"id":20119814,"url":"https://github.com/gruntjs/grunt-contrib-sass","last_synced_at":"2025-05-13T17:13:00.421Z","repository":{"id":4698574,"uuid":"5845768","full_name":"gruntjs/grunt-contrib-sass","owner":"gruntjs","description":"Compile Sass to CSS.","archived":false,"fork":false,"pushed_at":"2024-11-20T07:48:32.000Z","size":486,"stargazers_count":847,"open_issues_count":31,"forks_count":141,"subscribers_count":31,"default_branch":"main","last_synced_at":"2025-05-01T11:36:57.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://gruntjs.com/","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/gruntjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-09-17T19:06:15.000Z","updated_at":"2025-03-15T20:58:29.000Z","dependencies_parsed_at":"2022-09-10T22:52:12.605Z","dependency_job_id":"f7295d07-315c-4d79-84af-1f72f8b83be1","html_url":"https://github.com/gruntjs/grunt-contrib-sass","commit_stats":{"total_commits":176,"total_committers":29,"mean_commits":6.068965517241379,"dds":0.5227272727272727,"last_synced_commit":"2b74f768241f954e238c0dc138351e29ea5e4024"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-sass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-sass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-sass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gruntjs%2Fgrunt-contrib-sass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gruntjs","download_url":"https://codeload.github.com/gruntjs/grunt-contrib-sass/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253059569,"owners_count":21847322,"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":[],"created_at":"2024-11-13T19:17:15.827Z","updated_at":"2025-05-13T17:12:55.394Z","avatar_url":"https://github.com/gruntjs.png","language":"JavaScript","funding_links":[],"categories":["Tools"],"sub_categories":["CUI Preprocessor"],"readme":"# grunt-contrib-sass v2.0.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-sass.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-sass) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/ugf9aop97slt5anb/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-sass/branch/master)\n\n\u003e Compile Sass to CSS\n\n\n\n## Getting Started\n\nIf you haven't used [Grunt](https://gruntjs.com/) before, be sure to check out the [Getting Started](https://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](https://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-contrib-sass --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-contrib-sass');\n```\n\n\n\n\n## Sass task\n_Run this task with the `grunt sass` command._\n\n[Sass](http://sass-lang.com/) is a preprocessor that adds nested rules, variables, mixins and functions, selector inheritance, and more to CSS. Sass files compile into well-formatted, standard CSS to use in your site or application.\n\nThis task requires you to have [Ruby](http://www.ruby-lang.org/en/downloads/) and [Sass](http://sass-lang.com/install) installed. If you're on OS X or Linux you probably already have Ruby installed; test with `ruby -v` in your terminal. When you've confirmed you have Ruby installed, run `gem install sass` to install Sass.\n\nNote: Files that begin with \"_\" are ignored even if they match the globbing pattern. This is done to match the expected [Sass partial behaviour](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#partials).\n\n### Options\n\n\n#### sourcemap\n\nType: `String`  \nDefault: `auto`\n\nValues:\n\n- `auto` - relative paths where possible, file URIs elsewhere\n- `file` - always absolute file URIs\n- `inline` - include the source text in the sourcemap\n- `none`- no sourcemaps\n\n**Requires Sass 3.4.0, which can be installed with `gem install sass`**\n\n\n#### trace\n\nType: `Boolean`  \nDefault: `false`\n\nShow a full traceback on error.\n\n\n#### unixNewlines\n\nType: `Boolean`  \nDefault: `false` on Windows, otherwise `true`\n\nForce Unix newlines in written files.\n\n\n#### check\n\nType: `Boolean`  \nDefault: `false`\n\nJust check the Sass syntax, does not evaluate and write the output.\n\n\n#### style\n\nType: `String`  \nDefault: `nested`\n\nOutput style. Can be `nested`, `compact`, `compressed`, `expanded`.\n\n\n#### precision\n\nType: `Number`  \nDefault: `5`\n\nHow many digits of precision to use when outputting decimal numbers.\n\n\n#### quiet\n\nType: `Boolean`  \nDefault: `false`\n\nSilence warnings and status messages during compilation.\n\n\n#### compass\n\nType: `Boolean`  \nDefault: `false`\n\nMake Compass imports available and load project configuration (`config.rb` located close to the `Gruntfile.js`).\n\n\n#### debugInfo\n\nType: `Boolean`  \nDefault: `false`\n\nEmit extra information in the generated CSS that can be used by the FireSass Firebug plugin.\n\n\n#### lineNumbers\n\nType: `Boolean`  \nDefault: `false`\n\nEmit comments in the generated CSS indicating the corresponding source line.\n\n\n#### loadPath\n\nType: `String|Array`\n\nAdd a (or multiple) Sass import path.\n\n\n#### require\n\nType: `String|Array`\n\nRequire a (or multiple) Ruby library before running Sass.\n\n\n#### cacheLocation\n\nType: `String`  \nDefault: `.sass-cache`\n\nThe path to put cached Sass files.\n\n\n#### noCache\n\nType: `Boolean`  \nDefault: `false`\n\nDon't cache to sassc files.\n\n\n#### bundleExec\n\nType: `Boolean`  \nDefault: `false`\n\nRun `sass` with [bundle exec](https://bundler.io/man/bundle-exec.1.html): `bundle exec sass`.\n\n\n#### update\n\nType: `Boolean`  \nDefault: `false`\n\nOnly compile changed files.\n\n### Examples\n\n#### Example config\n\n```js\ngrunt.initConfig({\n  sass: {                              // Task\n    dist: {                            // Target\n      options: {                       // Target options\n        style: 'expanded'\n      },\n      files: {                         // Dictionary of files\n        'main.css': 'main.scss',       // 'destination': 'source'\n        'widgets.css': 'widgets.scss'\n      }\n    }\n  }\n});\n\ngrunt.loadNpmTasks('grunt-contrib-sass');\n\ngrunt.registerTask('default', ['sass']);\n```\n\n#### Compile\n\n```js\ngrunt.initConfig({\n  sass: {\n    dist: {\n      files: {\n        'main.css': 'main.scss'\n      }\n    }\n  }\n});\n```\n\n#### Concat and compile\n\nInstead of concatenating the files, just `@import` them into another `.sass` file eg. `main.scss`.\n\n\n#### Compile multiple files\n\nYou can specify multiple `destination: source` items in `files`.\n\n```js\ngrunt.initConfig({\n  sass: {\n    dist: {\n      files: {\n        'main.css': 'main.scss',\n        'widgets.css': 'widgets.scss'\n      }\n    }\n  }\n});\n```\n\n#### Compile files in a directory\n\nInstead of naming all files you want to compile, you can use the `expand` property allowing you to specify a directory. More information available in the [grunt docs](https://gruntjs.com/configuring-tasks) - `Building the files object dynamically`.\n\n```js\ngrunt.initConfig({\n  sass: {\n    dist: {\n      files: [{\n        expand: true,\n        cwd: 'styles',\n        src: ['*.scss'],\n        dest: '../public',\n        ext: '.css'\n      }]\n    }\n  }\n});\n```\n\n\n## Release History\n\n * 2020-03-04   v2.0.0   Update dependencies. Now requires at least Node 8.\n * 2016-03-04   v1.0.0   Bump `chalk`. Update to docs and project structure.\n * 2015-02-06   v0.9.0   Remove `banner` option. Allow using `--force` to ignore compile errors. Increase concurrency count from `2` to `4`. Improve Windows support.\n * 2014-08-24   v0.8.1   Fix `check` option.\n * 2014-08-21   v0.8.0   Support Sass 3.4 Source Map option. Add `update` option.\n * 2014-08-09   v0.7.4   Fix `bundleExec` option. Fix `os.cpus()` issue. Log `sass` command when `--verbose` flag is set.\n * 2014-03-06   v0.7.3   Only create empty dest files when they don't already exist.\n * 2014-02-02   v0.7.2   Fix error reporting when Sass is not available.\n * 2014-01-28   v0.7.1   Fix regression of Bundler support.\n * 2014-01-26   v0.7.0   Improve Windows support.\n * 2013-12-10   v0.6.0   Ignore files where filename have leading underscore.\n * 2013-08-21   v0.5.0   Add `banner` option.\n * 2013-07-06   v0.4.1   Use `file.orig.src` if `file.src` does not exist and return early to avoid passing non-existent files to sass binary.\n * 2013-06-30   v0.4.0   Rewrite task to be able to support Source Maps. Compile Sass files in parallel for better performance.\n * 2013-03-26   v0.3.0   Add support for `bundle exec`. Make sure `.css` files are compiled with SCSS.\n * 2013-02-15   v0.2.2   First official release for Grunt 0.4.0.\n * 2013-01-25   v0.2.2rc7   Updating grunt/gruntplugin dependencies to rc7. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.\n * 2013-01-09   v0.2.2rc5   Updating to work with grunt v0.4.0rc5. Switching to `this.files` API. Add `separator` option.\n * 2012-11-05   v0.2.0   Grunt 0.4 compatibility. Improve error message when Sass binary couldn't be found\n * 2012-10-12   v0.1.3   Rename grunt-contrib-lib dep to grunt-lib-contrib.\n * 2012-10-08   v0.1.2   Fix regression for darwin.\n * 2012-10-05   v0.1.1   Windows support.\n * 2012-09-24   v0.1.0   Initial release.\n\n---\n\nTask submitted by [Sindre Sorhus](https://github.com/sindresorhus)\n\n*This file was generated on Thu Aug 20 2020 12:31:17.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgruntjs%2Fgrunt-contrib-sass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgruntjs%2Fgrunt-contrib-sass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgruntjs%2Fgrunt-contrib-sass/lists"}