https://github.com/panthevm/compcss
A tool for transforming CSS with Clojure
https://github.com/panthevm/compcss
clojure css
Last synced: 11 months ago
JSON representation
A tool for transforming CSS with Clojure
- Host: GitHub
- URL: https://github.com/panthevm/compcss
- Owner: Panthevm
- License: mit
- Created: 2021-10-31T17:26:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-18T12:06:24.000Z (about 4 years ago)
- Last Synced: 2025-01-14T06:08:14.339Z (about 1 year ago)
- Topics: clojure, css
- Language: Clojure
- Homepage:
- Size: 331 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* CompCSS
A tool for transforming CSS with Clojure.
** Middleware
+ [[https://github.com/Panthevm/compcss-unused-remove][compcss-unused-remove]]
+ [[https://github.com/Panthevm/compcss-visually-impaired][compcss-visually-impaired]]
+ [[https://github.com/Panthevm/compcss-compression][compcss-compression]]
+ [[https://github.com/rnikolae/compcss-elochka-gori][compcss-elochka-gori]]
** Usage
Add a dependency.
#+BEGIN_SRC edn
compcss/compcss {:mvn/version "LASTEST"}
#+END_SRC
Create watcher at the start of the app.
#+BEGIN_SRC clj
(ns user)
(require 'compcss.core)
(compcss.core/create-watcher
{:input
{;; The directory of css source files
:css ["resources/public/css/src"]
;; The directory of source files
:clj ["src"]}
;; Handler for changes to source files
:handler
(->
compcss.core/after-middleware ;; stylesheets <- schema
compcss.core/before-middleware ;; stylesheets -> schema
)
;; Path to the outgoing css file
:output
{:css "resources/public/css/clean.css"}})
#+END_SRC
Done. Now changing the source files entails assembling the outgoing css file.
[[https://github.com/Panthevm/compcss/tree/master/example][Example project]]