From 4408c4d046965fe4a99a72043ec42c730f94fb5e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 30 Dec 2020 14:53:03 +0100 Subject: gnu: Add js-commander. * gnu/packages/javascript.scm (js-commander): New variable. --- gnu/packages/javascript.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'gnu/packages/javascript.scm') diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index c4bce1c42e..aed2ead719 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -187,6 +187,45 @@ plugins or software to be installed on the browser. So the page author can write web documents that include mathematics and be confident that readers will be able to view it naturally and easily."))) +(define-public js-commander + (package + (name "js-commander") + (version "6.2.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tj/commander.js") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "126m25s6mxpxmdj4aw5awz06b47r8r798lcf1c5bnmmh39cik5i1")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (chdir (assoc-ref %build-inputs "source")) + (let ((esbuild (string-append (assoc-ref %build-inputs "esbuild") + "/bin/esbuild")) + (target (string-append %output "/share/javascript/commander"))) + (invoke esbuild + "--bundle" + "--minify" + "--tsconfig=tsconfig.json" + "--platform=node" + (string-append "--outfile=" target "/index.min.js") + "index.js"))))) + (native-inputs + `(("esbuild" ,esbuild))) + (home-page "https://github.com/tj/commander.js") + (synopsis "Library for node.js command-line interfaces") + (description "Commander.js aims to be the complete solution for node.js +command-line interfaces. ") + (license license:expat))) + (define-public js-respond (package (name "js-respond") -- cgit v1.2.3 From 2005aa4b1bb88e6aadf305fb029d736050fc8507 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 30 Dec 2020 15:05:29 +0100 Subject: gnu: Add js-xmldom-sre. * gnu/packages/javascript.scm (js-xmldom-sre): New variable. --- gnu/packages/javascript.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'gnu/packages/javascript.scm') diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index aed2ead719..7bb2629a1e 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -226,6 +226,49 @@ be able to view it naturally and easily."))) command-line interfaces. ") (license license:expat))) +(define-public js-xmldom-sre + ;; This commit corresponds to the untagged release 0.1.32 + (let ((commit "3c79325bc2c9e5d27e3ba44b680fa8c5dd6a381d") + (revision "1")) + (package + (name "js-xmldom-sre") + (version "0.1.32") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zorkow/xmldom/") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0a88v0id3mjflpvjqhv8a28br0xvaaszxbf7alg6pxfbnkb69yyq")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (chdir (assoc-ref %build-inputs "source")) + (let ((esbuild (string-append (assoc-ref %build-inputs "esbuild") + "/bin/esbuild")) + (target (string-append %output "/share/javascript/xmldom-sre"))) + (invoke esbuild + "--bundle" + "--minify" + "--platform=node" + (string-append "--outfile=" target "/dom-parser.min.js") + "dom-parser.js"))))) + (native-inputs + `(("esbuild" ,esbuild))) + (home-page "https://github.com/zorkow/xmldom/") + (synopsis "DOM parser and XML serializer") + (description "This is a fork of the xmldom library. It allows the use +of wicked-good-xpath together with xmldom.") + ;; One of these licenses may be selected. + (license (list license:expat + license:lgpl2.0))))) + (define-public js-respond (package (name "js-respond") -- cgit v1.2.3 From b509a071943d73f832a93af51d344785f49c5e8f Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Thu, 7 Jan 2021 12:31:41 +0100 Subject: gnu: Add duktape. * gnu/packages/javascript.scm (duktape): New variable. --- gnu/packages/javascript.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'gnu/packages/javascript.scm') diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index 7bb2629a1e..8434836c6f 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner ;;; Copyright © 2018 Nicolas Goaziou +;;; Copyright © 2021 Pierre Neidhardt ;;; ;;; This file is part of GNU Guix. ;;; @@ -623,3 +624,31 @@ Javascript sources to executables with no external dependency. It includes a command line interpreter with contextual colorization implemented in Javascript and a small built-in standard library with C library wrappers.") (license license:expat))) + +(define-public duktape + (package + (name "duktape") + (version "2.6.0") + (source (origin + (method url-fetch) + (uri (string-append "https://duktape.org/duktape-" + version ".tar.xz")) + (sha256 + (base32 + "19szwxzvl2g65fw95ggvb8h0ma5bd9vvnnccn59hwnc4dida1x4n")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; No tests. + #:make-flags (list "-f" "Makefile.sharedlibrary" + (string-append "INSTALL_PREFIX=" %output)) + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (home-page "https://duktape.org/") + (synopsis "Small embeddable Javascript engine") + (description "Duktape is an embeddable Javascript engine, with a focus on +portability and compact footprint. Duktape is easy to integrate into a C/C++ +project: add @file{duktape.c}, @file{duktape.h}, and @file{duk_config.h} to +your build, and use the Duktape API to call ECMAScript functions from C code +and vice versa.") + (license license:expat))) -- cgit v1.2.3