{"id":13733718,"url":"https://github.com/robfletcher/gradle-compass","last_synced_at":"2025-12-17T06:44:16.668Z","repository":{"id":8384088,"uuid":"9957962","full_name":"robfletcher/gradle-compass","owner":"robfletcher","description":"A SASS / Compass plugin for Gradle","archived":false,"fork":false,"pushed_at":"2020-01-10T02:05:19.000Z","size":321,"stargazers_count":60,"open_issues_count":36,"forks_count":36,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-21T10:40:35.067Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robfletcher.png","metadata":{"files":{"readme":"README.adoc","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}},"created_at":"2013-05-09T11:30:40.000Z","updated_at":"2024-10-15T00:22:40.000Z","dependencies_parsed_at":"2022-07-31T00:47:55.700Z","dependency_job_id":null,"html_url":"https://github.com/robfletcher/gradle-compass","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/robfletcher/gradle-compass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robfletcher%2Fgradle-compass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robfletcher%2Fgradle-compass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robfletcher%2Fgradle-compass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robfletcher%2Fgradle-compass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robfletcher","download_url":"https://codeload.github.com/robfletcher/gradle-compass/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robfletcher%2Fgradle-compass/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27778761,"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","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-03T03:00:47.979Z","updated_at":"2025-12-17T06:44:16.631Z","avatar_url":"https://github.com/robfletcher.png","language":"Groovy","funding_links":[],"categories":["Plugins"],"sub_categories":["Web application development"],"readme":"= Gradle Compass plugin\n\nA http://sass-lang.com/[SASS] / http://compass-style.org/[Compass] plugin for http://gradle.org/[Gradle]. The plugin uses JRuby to install and run Compass.\n\nimage:https://travis-ci.org/robfletcher/gradle-compass.svg?branch=master[\"Build Status\", link=\"https://travis-ci.org/robfletcher/gradle-compass\"]\n\nimage::https://api.bintray.com/packages/robfletcher/gradle-plugins/compass-gradle-plugin/images/download.svg[link=\"https://bintray.com/robfletcher/gradle-plugins/compass-gradle-plugin/_latestVersion\"]\n\n== Tasks\n\nThe plugin adds the following tasks:\n\n=== compassCompile\n\nCompiles all SASS files. Equivalent to the `compass compile` command. The task supports incremental build.\n\n=== compassWatch\n\nCompiles and watches all SASS files. Equivalent to the `compass watch` command.\n\n=== compassVersion\n\nPrints out the compass version.\n\n=== compassConfig\n\nWrites compass configuration out to `config/compass.rb`.\n\n== Installation\n\nAdd the plugin like this:\n\n[code, lang=groovy]\n----\napply plugin: \"com.github.robfletcher.compass\"\n\nbuildscript {\n  repositories {\n    jcenter()\n    maven { url \"http://dl.bintray.com/robfletcher/gradle-plugins\" }\n  }\n  dependencies {\n    classpath \"com.github.robfletcher:compass-gradle-plugin:2.0.5\"\n  }\n}\n----\n\n== Configuration\n\nGeneral configuration for the plugin goes inside a `compass` block in your build file and will apply to all tasks. You can also specify configuration properties on the individual tasks (for example you may want to set `environment = \"production\"` on the *compileSass* and `debugInfo = true` on *watchSass*). For example:\n\n[code, lang=groovy]\n----\ncompass {\n  cssDir = file(\"public/styles\")\n  sassDir = file(\"src/main/sass\")\n}\n----\n\n=== Configuration parameters\n\nThe full set of parameters supported by the plugin is…\n\n==== Paths\n\n* `cssDir`: the target directory where compiled CSS is output. Equivalent to `--css-dir`. Defaults to `build/stylesheets`.\n* `sassDir`: the source directory where you keep *.scss* and/or *.sass* files. Equivalent to `--sass-dir`. Defaults to `src/main/sass`.\n* `imagesDir`: the source directory where you keep image files. Equivalent to `--images-dir`.\n* `javascriptsDir`: the source directory where you keep JavaScript files. You don't need to specify this unless you have Compass extensions in your scripts. Equivalent to `--javascripts-dir`.\n* `fontsDir`: the source directory where you keep fonts. Equivalent to `--fonts-dir`.\n* `importPath`: a set of directories containing other Sass stylesheets. Specifying this allows you to reference those stylesheets in `@import` directives. Equivalent to `--import-paths`.\n* `load`: loads a framework or extensions found in the specified directory. Equivalent to `--load`.\n* `loadAll`: loads all frameworks or extensions found in the specified directory. Equivalent to `--load-all`.\n\n==== Compilation options\n\n* `sourcemap`: if *true* Compass will generate a sourcemap during compilation. Equivaluent to `--sourcemap`.\n* `debugInfo`: if *true* (the default) Compass adds debug information to the compiled CSS. Equivalent to `--debug-info` if set to *true* or `--no-debug-info` if set to *false*.\n* `force`: if *true* Compass will overwrite existing files. Equivalent to `--force`.\n* `environment`: sets default options when set to *'development'* (the default) or *'production'*. Equivalent to `--environment`.\n* `noLineComments`: if *true* Compass will not output line comments to the compiled CSS files. Equivalent to `--no-line-comments`.\n* `outputStyle`: selects the style for compiled CSS. One of *nested*, *expanded*, *compact* (the default) or *compressed*. Eqivalent to `--output-style`.\n* `relativeAssets`: if *true* Compass will generate relative urls to assets. Equivalent to `--relative-assets`.\n* `httpPath`: sets the path to the root of the web application when deployed. Equivalent to `--http-path`.\n* `generatedImagesPath`: sets the path where generated images are stored. Equivalent to `--generated-images-path`.\n\n==== Command line output\n\n* `time`: if *true* Compass will print timing information during compilation. Equivaluent to `--time`.\n* `boring`: if *true* colorized output is disabled. Equivalent to `--boring`.\n* `quiet`: if *true* Compass output is suppressed. Equivalent to `--quiet`.\n* `trace`: if *true* Compass displays full stack traces on error. Equivalent to `--trace`.\n\n==== Dependency options\n\n* `gemDir`: the directory where the Compass gem (and any other gems you specify) will be installed. Defaults to `build/tmp/gems`. You may want to override this to use a shared location in multi-project builds so that gems only get downloaded once.\n\n=== Specifying the Compass version\n\nBy default the plugin will use the latest version of Compass available. If you need a specific version you can set the version using Gradle's dependency management. For example:\n\n[code, lang=groovy]\n----\ndependencies {\n  compass \"rubygems:compass:1.0.1\"\n}\n----\n\nGems are installed using the JRuby Gradle plugin. The Compass plugin creates a special _\"compass\"_ configuration that is used by all the plugin's tasks.\n\n=== Cleaning output\n\nThe Compass plugin creates a `cleanCompassCompile` task automatically that will delete compiles CSS. The main `clean` task will also delete CSS assuming `cssDir` is inside the project's `build` directory.\n\n=== Using additional gems\n\nYou can use Compass extensions from Ruby gems by adding dependencies to the _compass_ configuration. The plugin will automatically add a `--require` argument for each gem when invoking Compass commands. For example to use the _[Breakpoint][breakpoint]_ extension:\n\n[code, lang=groovy]\n----\ndependencies {\n  compass \"rubygems:breakpoint:2.5.0\"\n}\n----\n\n=== Automatically recompiling stylesheets while other tasks are running\n\nA typical use-case is to run `compassWatch` in the background while another task runs your web-server application. This is very easy with the Compass plugin.\n\nAssuming you're using the http://www.gradle.org/docs/current/userguide/application_plugin.html[Application plugin]'s `run` task you would configure your build with:\n\n[code, lang=groovy]\n----\nrun.dependsOn compassWatchStart\nrun.finalizedBy compassWatchStop\n----\n\n=== Advanced Gem Install Options\n\nYou can specify additional options to `gem install`:\n\n[code, lang=groovy]\n----\ncompass {\n\tgems = [\n\t\t[\n\t\t\tname: \"compass\",\n\t\t\tversion: \"0.12.7\",\n\t\t],\n\t\t[\n\t\t\tname: \"compass-css-arrow\",\n\t\t\tversion: \"0.0.4\",\n\t\t\topts: [\"--ignore-dependencies\"],\n\t\t],\n\t]\n}\n----\n\n= Version history\n\n=== 2.0.5\n\n* Fixes JDK version compatibility so plugin can be used with Java 1.7.\n\n=== 2.0.5\n\n* No custom `compassClean` task – instead apply the _base_ plugin so we get cleanup by convention.\n\n=== 2.0.4\n\n* Allow setting of directory where compass gems get installed (mainly this helps the integration tests run in a sane amount of time but it's also useful for multi-project builds).\n\n=== 2.0.3\n\n* Fixes problem with POM configuration that meant transitive dependencies didn't work.\n\n=== 2.0.2\n\n* Implements `compassWatch` using John Engleman's https://github.com/johnrengelman/gradle-processes[Process plugin].\n\n=== 2.0\n\n* JRuby is handled by the [JRuby Gradle plugin](https://github.com/jruby-gradle/jruby-gradle-plugin).\n\n=== 1.0.10\n\n* added ability to specify gem versions.\n\n=== 1.0.9\n\n* use additional gems without needing a *config.rb* file.\n\n=== 1.0.8\n\n* added ability to specify additional gems.\n\n=== 1.0.7\n\n* made `javascriptsDir`, `imagesDir` and `importPath` optional.\n\n=== 1.0.6\n\n* added ability to specify `importPath`.\n\n=== 1.0.5\n\n* added various command line options. Thanks [Ben Groves](http://github.com/bgroves).\n\n=== 1.0.4\n\n* added ability to specify file encoding used by JRuby.\n\n[app-plugin]:\n[compass]:http://compass-style.org/\n[gradle]:http://gradle.org/\n[sass]:http://sass-lang.com/\n[breakpoint]:http://breakpoint-sass.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobfletcher%2Fgradle-compass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobfletcher%2Fgradle-compass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobfletcher%2Fgradle-compass/lists"}