From c73384a44ee8e559414741d8034b47359723d196 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Thu, 28 Jun 2018 10:09:21 -0400 Subject: [PATCH] escape and minify for production --- README.md | 5 ++- flute.asd | 4 ++- src/flute.lisp | 92 ++++++++++++++---------------------------------- src/package.lisp | 31 ++++++++++++++++ src/util.lisp | 72 +++++++++++++++++++++++++++++++++++++ 5 files changed, 136 insertions(+), 68 deletions(-) create mode 100644 src/package.lisp create mode 100644 src/util.lisp diff --git a/README.md b/README.md index e4b5b47..14cbab7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,10 @@ # Usage -[Examples of usage] +## Minify for production +```lisp +(write root-element :pretty nil) +``` # License diff --git a/flute.asd b/flute.asd index e3948fa..b0e2ba5 100644 --- a/flute.asd +++ b/flute.asd @@ -5,7 +5,9 @@ :components ((:module "src" :serial t :components - ((:file "flute")))) + ((:file "package") + (:file "util") + (:file "flute")))) :description "A beautiful, easilly composable html generation library" :long-description #.(uiop:read-file-string diff --git a/src/flute.lisp b/src/flute.lisp index 2f269ca..b539778 100644 --- a/src/flute.lisp +++ b/src/flute.lisp @@ -1,33 +1,3 @@ -(in-package :cl-user) -(defpackage flute - (:use :cl) - (:import-from :assoc-utils - :alist - :alistp - :hash-alist - :aget - :delete-from-alistf) - (:import-from :let-over-lambda - :defmacro! - :mkstr - :flatten) - (:import-from :alexandria - :make-keyword) - (:export - ;; all html5 elements, e.g. div, nav, media, export in code - ;; except