From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFOMp-0001tF-Gd for guix-patches@gnu.org; Mon, 29 May 2017 13:22:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFOMm-0006MA-4f for guix-patches@gnu.org; Mon, 29 May 2017 13:22:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:40942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dFOMm-0006M2-1r for guix-patches@gnu.org; Mon, 29 May 2017 13:22:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dFOMl-0000g4-Sa for guix-patches@gnu.org; Mon, 29 May 2017 13:22:03 -0400 Subject: bug#27132: [PATCH 5/6] gnu: Add sbcl-cl-uglify-js. Resent-Message-ID: From: Ricardo Wurmus Date: Mon, 29 May 2017 19:21:30 +0200 Message-Id: <20170529172131.20954-5-rekado@elephly.net> In-Reply-To: <20170529172131.20954-1-rekado@elephly.net> References: <20170529172131.20954-1-rekado@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27132@debbugs.gnu.org Cc: Ricardo Wurmus * 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 669005d24..959d4c534 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 +“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)))) -- 2.12.2