diff options
| author | Mark H Weaver <mhw@netris.org> | 2018-05-17 01:00:50 -0400 |
|---|---|---|
| committer | Mark H Weaver <mhw@netris.org> | 2018-05-17 01:00:50 -0400 |
| commit | 539bf8f2c071b53834829259bb3fabf0390c5dc6 (patch) | |
| tree | 16672732afbf4c3f933e67ac677aa1877f6a7657 /gnu/packages/javascript.scm | |
| parent | 903874328ed5e5ab766e36cee1b1a0989e8b24a9 (diff) | |
| parent | 2cf8531f360ef390d3ec670cc150b106bab5eff1 (diff) | |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/javascript.scm')
| -rw-r--r-- | gnu/packages/javascript.scm | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index eeeec406a89..3a9e88ad08b 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> | 3 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> |
| 4 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> | 4 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> |
| 5 | ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> | 5 | ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> |
| 6 | ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr> | ||
| 6 | ;;; | 7 | ;;; |
| 7 | ;;; This file is part of GNU Guix. | 8 | ;;; This file is part of GNU Guix. |
| 8 | ;;; | 9 | ;;; |
| @@ -370,6 +371,44 @@ to ES5 without causing run-time errors in older engines. In many cases, this | |||
| 370 | means that these shams cause many ES5 methods to silently fail.") | 371 | means that these shams cause many ES5 methods to silently fail.") |
| 371 | (license license:expat))) | 372 | (license license:expat))) |
| 372 | 373 | ||
| 374 | (define-public js-filesaver | ||
| 375 | (package | ||
| 376 | (name "js-filesaver") | ||
| 377 | (version "1.3.8") | ||
| 378 | (source (origin | ||
| 379 | (method url-fetch) | ||
| 380 | (uri (string-append "https://github.com/eligrey/FileSaver.js/" | ||
| 381 | "archive/" version ".tar.gz")) | ||
| 382 | (file-name (string-append name "-" version)) | ||
| 383 | (sha256 | ||
| 384 | (base32 | ||
| 385 | "1rkhfqs5plaj628kzj7qgm5qahy4v7ihygifidqr6g6265mil97h")))) | ||
| 386 | (build-system minify-build-system) | ||
| 387 | (arguments | ||
| 388 | `(#:phases | ||
| 389 | (modify-phases %standard-phases | ||
| 390 | (add-after 'unpack 'fix-uglification | ||
| 391 | ;; Remove "export" keyword which prevents the file from being | ||
| 392 | ;; uglified by uglify-js. Moreover, that keyword is not present in | ||
| 393 | ;; the minified version of the library some projects are using, | ||
| 394 | ;; e.g., | ||
| 395 | ;; <https://github.com/jmoenig/Snap--Build-Your-Own-Blocks/blob/master/FileSaver.min.js> | ||
| 396 | (lambda _ | ||
| 397 | (substitute* "src/FileSaver.js" | ||
| 398 | (("export ") "")) | ||
| 399 | #t))))) | ||
| 400 | (home-page | ||
| 401 | "https://eligrey.com/blog/saving-generated-files-on-the-client-side/") | ||
| 402 | (synopsis "HTML5 saveAs() FileSaver implementation") | ||
| 403 | (description "@file{FileSaver.js} implements the @code{saveAs()} | ||
| 404 | FileSaver interface in browsers that do not natively support it. | ||
| 405 | |||
| 406 | @file{FileSaver.js} is the solution to saving files on the | ||
| 407 | client-side, and is perfect for webapps that need to generate files, | ||
| 408 | or for saving sensitive information that shouldn't be sent to an | ||
| 409 | external server.") | ||
| 410 | (license license:expat))) | ||
| 411 | |||
| 373 | (define-public mujs | 412 | (define-public mujs |
| 374 | (package | 413 | (package |
| 375 | (name "mujs") | 414 | (name "mujs") |
