From 4eb6da3e0f375c56454b3c696ff27e4164806d5c Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Wed, 1 May 2019 16:40:54 -0500 Subject: [PATCH] the usage of --source-map with uglifyjs seems to have changed --- tools/uglifyjs.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/uglifyjs.R b/tools/uglifyjs.R index 2c1796044..33b3b83dc 100644 --- a/tools/uglifyjs.R +++ b/tools/uglifyjs.R @@ -2,8 +2,8 @@ uglifyjs = function(file, args = NULL) { if (Sys.which('uglifyjs') == '') return(1) owd = setwd(dirname(file)); on.exit(setwd(owd), add = TRUE) file = basename(file) - out = shQuote(xfun::with_ext(file, c('.min.js', '.min.map'))) - system2('uglifyjs', c(shQuote(file), '-o', out[1], '--source-map', out[2], args)) + out = shQuote(xfun::with_ext(file, '.min.js')) + system2('uglifyjs', c(shQuote(file), '--source-map', '-o', out, args)) } xfun::in_dir('inst/resources/gitbook/js', uglifyjs('app.js'))