From 52650a4d2eb6ad54a638a139608f4b3d87d7905f Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 29 Dec 2016 19:51:52 +0100 Subject: gnu: Add sbcl-cl-uglify-js. * gnu/packages/lisp.scm (sbcl-cl-uglify-js): New variable. --- gnu/packages/lisp.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 669005d246..08e6b44116 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -1301,3 +1301,43 @@ It is similar to the @code{CL:LOOP} macro, with these distinguishing marks: @item it isn't part of the ANSI standard for Common Lisp. @end itemize\n") (license license:expat))) + +(define-public sbcl-cl-uglify-js + ;; There have been many bug fixes since the 2010 release. + (let ((commit "429c5e1d844e2f96b44db8fccc92d6e8e28afdd5") + (revision "1")) + (package + (name "sbcl-cl-uglify-js") + (version (string-append "0.1-" revision "." (string-take commit 9))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mishoo/cl-uglify-js.git") + (commit commit))) + (sha256 + (base32 + "0k39y3c93jgxpr7gwz7w0d8yknn1fdnxrjhd03057lvk5w8js27a")))) + (build-system asdf-build-system/sbcl) + (inputs + `(("sbcl-parse-js" ,sbcl-parse-js) + ("sbcl-cl-ppcre" ,sbcl-cl-ppcre) + ("sbcl-cl-ppcre-unicode" ,sbcl-cl-ppcre-unicode) + ("sbcl-parse-number" ,sbcl-parse-number) + ("sbcl-iterate" ,sbcl-iterate))) + (home-page "https://github.com/mishoo/cl-uglify-js") + (synopsis "JavaScript compressor library for Common Lisp") + (description "This is a Common Lisp version of UglifyJS, a JavaScript +compressor. It works on data produced by @code{parse-js} to generate a +@dfn{minified} version of the code. Currently it can: + +@itemize +@item reduce variable names (usually to single letters) +@item join consecutive @code{var} statements +@item resolve simple binary expressions +@item group most consecutive statements using the ``sequence'' operator (comma) +@item remove unnecessary blocks +@item convert @code{IF} expressions in various ways that result in smaller code +@item remove some unreachable code +@end itemize\n") + (license license:zlib)))) -- cgit v1.2.3