diff --git a/README.md b/README.md index c89a5dc..5235dd3 100644 --- a/README.md +++ b/README.md @@ -207,3 +207,15 @@ LASS includes a tiny elisp file, `lass.el`. Add LASS' directory to your emacs `L Once you visit a `.lass` file, it will automatically start in the `LASS` major-mode, which is a derived-mode from `COMMON-LISP-MODE`. Whenever you save, it will automatically try to compile the lass file to its CSS equivalent. If slime is connected, it will try to quickload LASS and evaluate `GENERATE`. If slime is not connected, it instead executes a shell command. In order for that to work, the [`lass` binary](https://github.com/Shinmera/LASS/releases) must be in your path. If your operating system is not directly supported with a binary, you can build it yourself using a build tool like [Buildapp](http://www.xach.com/lisp/buildapp/), the ASDF system `BINARY-LASS` and the entry-point `BINARY-LASS:CMD-WRAPPER`. + +ASDF Integration +---------------- +If you want to compile LASS files to CSS in your systems, you can now (v0.4+) do this via a `lass-file` component type, and `:defsystem-depends-on`-ing LASS. + +``` +(asdf:defsystem my-system + :defsystem-depends-on (:lass) + :components ((:lass-file "test-file"))) +``` + +You can also specify an `:output` argument to a `lass-file` to specify what the target css file should be. diff --git a/about.html b/about.html index 67ac89d..317b98a 100644 --- a/about.html +++ b/about.html @@ -4,14 +4,15 @@ LASS @@ -19,7 +20,7 @@

lass

- 0.2.0 + 0.4.0

Lisp Augmented Style Sheets. Compiles LASS to CSS.

@@ -212,12 +213,22 @@ article p a:hover, article blockquote a:hover{

Once you visit a .lass file, it will automatically start in the LASS major-mode, which is a derived-mode from COMMON-LISP-MODE. Whenever you save, it will automatically try to compile the lass file to its CSS equivalent. If slime is connected, it will try to quickload LASS and evaluate GENERATE. If slime is not connected, it instead executes a shell command. In order for that to work, the lass binary must be in your path.

If your operating system is not directly supported with a binary, you can build it yourself using a build tool like Buildapp, the ASDF system BINARY-LASS and the entry-point BINARY-LASS:CMD-WRAPPER.

+ +

ASDF Integration

+ +

If you want to compile LASS files to CSS in your systems, you can now (v0.4+) do this via a lass-file component type, and :defsystem-depends-on-ing LASS.

+ +
(asdf:defsystem my-system
+  :defsystem-depends-on (:lass)
+  :components ((:lass-file "test-file")))
+ +

You can also specify an :output argument to a lass-file to specify what the target css file should be.

Copyright

- lass is licensed under the Artistic license and ©2014 Nicolas Hafner <shinmera@tymoon.eu>. This library can be obtained on https://github.com/Shinmera/LASS. + lass is licensed under the Artistic license and ©2015 Nicolas Hafner <shinmera@tymoon.eu>. This library can be obtained on https://github.com/Shinmera/LASS.

Package Index

@@ -227,6 +238,32 @@ article p a:hover, article blockquote a:hover{ (ORG.TYMOONNEXT.LASS)
+
  • + +
    +
    + MACRO + +

    DEFINE-PRIMITIVE-PROPERTY-CONSUMER

    + + (SPECIALIZER (PROPVALS READABLE NEXT) &BODY LOOP-BODY) +
    +
    +
    Defines a CONSUME-ITEM method for the given item SPECIALIZER.
    +
    +SPECIALIZER --- The method specializer for the item.
    +PROPVALS    --- The list that should contain the property values.
    +READABLE    --- The readable-list being operated on currently.
    +NEXT        --- Bound to the next (unconsumed) item in the readable-list.
    +LOOP-BODY   --- The body of the reading loop to execute until the readable is empty.
    +
    +The return value of the loop-body is discarded. You can use (RETURN) to exit the loop,
    +for example for when you encounter an item you don't want to read.
    +
    +
  • + +
    +
    + MACRO + +

    DEFINE-PROPERTY-FUNCTION

    + + (NAME ARGS &BODY BODY) +
    +
    +
    Define a new property function NAME, accepting ARGS. 
    +The body should return a value to use directly, if possible a string.
    +The results of a property-function should not be RESOVLEd.
    +
    +Property functions are function calls that occur as (part of) the
    +value of a property. Due to ambiguity issues with a general sub-block,
    +property functions need to be explicitly defined and may completely
    +differ depending on the property. Property functions defined with this
    +are only the defaults available for all properties. If you want to
    +minimise collision probability or avoid an illegal function for a
    +certain property, you should define a direct method on CONSUME-ITEM
    +to handle the reading of the property values manually.
    +
    +
  • + +
    +
    + MACRO + +

    DEFINE-PROPERTY-FUNCTION-CASE

    + + (PROPERTY (ARGS) &BODY FUNCTION-CLAUSES) +
    +
    +
    Defines a CONSUME-ITEM method for PROPERTY that has special handling for property-functions.
    +
    +FUNCTION-CLAUSES ::= function-clause*
    +FUNCTION-CLAUSE  ::= (function-name form*)
    +
    +Each function-name is compared by STRING-EQUAL and each clause should return the
    +property-value to use in its place, or NIL if it should be skipped.
    +
    +You can use (RETURN) in a clause body to stop reading values altogether.
    +
    +
  • + + +
  • + +
    +
    + MACRO + +

    DEFINE-SIMPLE-PROPERTY-FUNCTIONS

    + + (PROPERTY &REST FUNCSPECS) +
    +
    +
    Defines a CONSUME-ITEM method for PROPERTY that has special handling for property-functions.
    +
    +FUNCSPECS ::= funcspec*
    +FUNCSPEC  ::= (funcname arg* [&optional arg*] [&key arg*])
    +
    +See DEFINE-PROPERTY-FUNCTION-CASE.
    +
  • diff --git a/asdf.lisp b/asdf.lisp index d6b5e2f..11f7844 100644 --- a/asdf.lisp +++ b/asdf.lisp @@ -8,7 +8,8 @@ (defclass lass-file (asdf:source-file) ((output :initarg :output :initform NIL :accessor output)) - (:default-initargs :type "lass")) + (:default-initargs :type "lass") + (:documentation "An ASDF source-file component to allow compilation of LASS to CSS in ASDF systems.")) ;; Hack to ensure that ASDF recognises the class ;; as a keyword, which I think is currently a bug. diff --git a/lass.asd b/lass.asd index 3db99bb..253dc79 100644 --- a/lass.asd +++ b/lass.asd @@ -10,7 +10,7 @@ (defsystem lass :name "LASS" - :version "0.3.0" + :version "0.4.0" :license "Artistic" :author "Nicolas Hafner " :maintainer "Nicolas Hafner "