{"id":15041689,"url":"https://github.com/deraen/sass4clj","last_synced_at":"2025-10-07T17:09:35.614Z","repository":{"id":46766250,"uuid":"43171424","full_name":"Deraen/sass4clj","owner":"Deraen","description":"SASS compiler for Clj, Lein and Boot, using Libsass Java wrapper","archived":false,"fork":false,"pushed_at":"2024-04-10T11:43:09.000Z","size":156,"stargazers_count":70,"open_issues_count":2,"forks_count":16,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T09:08:18.951Z","etag":null,"topics":["boot","boot-tasks","clojure","leiningen","libsass","sass","webjars"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Deraen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"2015-09-25T19:32:02.000Z","updated_at":"2024-05-31T07:50:27.000Z","dependencies_parsed_at":"2024-09-20T18:32:40.144Z","dependency_job_id":null,"html_url":"https://github.com/Deraen/sass4clj","commit_stats":{"total_commits":129,"total_committers":10,"mean_commits":12.9,"dds":0.1705426356589147,"last_synced_commit":"7470c49e89a62a06cfff094a0c8eef39786084e7"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deraen%2Fsass4clj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deraen%2Fsass4clj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deraen%2Fsass4clj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Deraen%2Fsass4clj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Deraen","download_url":"https://codeload.github.com/Deraen/sass4clj/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457802,"owners_count":20941906,"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":["boot","boot-tasks","clojure","leiningen","libsass","sass","webjars"],"created_at":"2024-09-24T20:46:22.588Z","updated_at":"2025-10-07T17:09:30.590Z","avatar_url":"https://github.com/Deraen.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sass4clj\n[![Clojars Project](https://img.shields.io/clojars/v/deraen/sass4clj.svg)](https://clojars.org/deraen/sass4clj)\n[![Build Status](https://travis-ci.org/Deraen/sass4clj.svg?branch=master)](https://travis-ci.org/Deraen/sass4clj)\n[![AppVeyor](https://img.shields.io/appveyor/ci/deraen/sass4clj.svg?maxAge=2592000\u0026label=windows)](https://ci.appveyor.com/project/Deraen/sass4clj)\n\nClojure wrapper for [jsass](https://github.com/bit3/jsass/) JNA wrapper for Libsass.\nThis repository also contains [Boot](http://boot-clj.com/) and [Leiningen](http://leiningen.org/) tasks.\n\nFor parallel Less library check [less4clj](https://github.com/Deraen/less4clj)\n\n## ATTENTION: [libsass](https://sass-lang.com/blog/libsass-is-deprecated) (the C library) and the JNA wrapper library [jsass](https://github.com/bit3/jsass/) are deprecated. Consider using [Dart Sass](https://sass-lang.com/dart-sass) if you do not need to read SCSS files from the Java classpath. [You can integrate Dart Sass process with Shadow CLJS.](https://gist.github.com/Deraen/695c94848d3ee05990239d403f7fe733)\n\nBoth sass4clj still works and will receive bug fixes, but the difference\nbetween libsass and dart-sass will continue growing.\n\nSome ideas if you need to read files from the classpath or jar files:\n\n- It might be possible to extend dart-sass through [Importer API](https://pub.dev/documentation/sass/latest/sass/Importer-class.html)\n- Extract files from the jar files in a script before calling dart-sass compile (for example, using `clj` and `unzip`)\n\n## Features\n\n- Jsass features\n    - Requires Java 1.8\n    - Linux \u0026 Windows builds are automatically tested\n    - (Doesn't work on Alpine based Docker images)\n- Load imports directly from Java classpath (e.g. Webjars)\n    - Add dependency `[org.webjars.bower/bootstrap \"4.0.0-alpha\"]` to use [Bootstrap](http://getbootstrap.com/)\n- Assumes that files starting with `_` are [partial files](http://sass-lang.com/guide) and should not be compiled into CSS files.\n- Non feature: compilation warnings are reported by libsass/jsass directly to stdout,\nand aren't accessible from sass4clj API.\n\n## Boot [![Clojars Project](https://img.shields.io/clojars/v/deraen/boot-sass.svg)](https://clojars.org/deraen/boot-sass)\n\n* Provides the `sass` task (`deraen.boot-sass/sass`)\n* Select main files using `inputs` option\n* or, for each `.sass` or `.scss` file not starting with `_` in the fileset creates equivalent `.css` file.\n* Check `boot sass --help` for task options.\n\n## Leiningen [![Clojars Project](https://img.shields.io/clojars/v/deraen/lein-sass4clj.svg)](https://clojars.org/deraen/lein-sass4clj)\n\n* Provides the `sass4clj` task\n* Select main files using `inputs` option\n* or, for each `.sass` or `.scss` file not starting with `_` in source-dirs creates equivalent `.css` file.\n* Check `lein help sass4clj` for options.\n\n## Clj\n\nTest in the repository:\n\n`clj -m sass4clj.main --source-paths test-resources`\n\nCheck `clj -m sass4clj.main --help` for options.\n\n## Import load order\n\nLoading order for `@import \"{name}\";` on file at `{path}`\n\n1. Local file at `{path}/{name}.sass` or `{path}/{name}.scss`\n2. Local files on other source-paths, `{source-path}/{name}.ext`\n2. Classpath resource `(io/resource \"{name}.ext\")`\n3. Classpath resource `(io/resource \"{path}/{name}.ext\")`\n4. Webjar asset\n    - Resource `META-INF/resources/webjars/{package}/{version}/{path}` can be referred using `{package}/{path}`\n    - For example `@import \"bootstrap/scss/bootstrap.scss\";` will import  `META-INF/resources/webjars/bootstrap/4.0.0-alpha/scss/bootstrap.scss`\n\n## FAQ\n\n### Shadow-cljs integration\n\nIf you want to combine CLJS compilation with Shadow CLJS and Sass compilation,\nyou can create your function which starts both watches and run this using\nshadow-cljs [clj-run](https://shadow-cljs.github.io/docs/UsersGuide.html#_calling_watch_via_clj_run)\ntask.\n\n```clj\n(ns app.shadow\n  (:require [shadow.cljs.devtools.api :as shadow]\n            [sass4clj.api :as sass]\n            [clojure.edn :as edn]))\n\n(defn watch\n  {:shadow/requires-server true}\n  [\u0026 _args]\n  ;; Sass compilation probably starts faster.\n  ;; Both watches keep running until ctrl-c.\n  (sass/start (-\u003e (edn/read-string (slurp \"sass4clj.edn\"))\n                  (assoc :target-path \"target/dev/public/css\")))\n  (shadow/watch :app))\n```\n\n\u003e The configuration file, sass4clj.edn, is also supported by sass4clj.main\n\u003e namespace. You could use that to compile CSS for your production build\n\u003e instead of the leiningen plugin.\n\nAnd start the watch with (or with whatever tool you are using):\n\n```\nlein run -m shadow.cljs.devtools.cli clj-run app.shadow/watch\n```\n\nYou need to ensure that the classpath used by shadow-cljs contains `deraen/sass4clj`\nand any packages where you are importing sass files from.\n\n### Log configuration\n\nIf you don't have any slf4j implementations, you will see a warning:\n\n```\nSLF4J: Failed to load class \"org.slf4j.impl.StaticLoggerBinder\".\nSLF4J: Defaulting to no-operation (NOP) logger implementation\nSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.\n```\n\nTo disable this, add a no operation logger to your project. As this is only required\non the build phase, you can use `:scope \"test\"` so that the dependency is not\ntransitive and is not included in Uberjar. Alternatively, you can add this\ndependency to your Leiningen dev profile.\n\n```\n[org.slf4j/slf4j-nop \"1.7.13\" :scope \"test\"]\n```\n\n## License\n\nCopyright © 2014-2021 Juho Teperi\n\nDistributed under the Eclipse Public License either version 1.0 or (at your option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderaen%2Fsass4clj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderaen%2Fsass4clj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderaen%2Fsass4clj/lists"}