Skip to content

Commit

Permalink
the usage of --source-map with uglifyjs seems to have changed
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed May 1, 2019
1 parent 5beb7fd commit 4eb6da3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/uglifyjs.R
Expand Up @@ -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'))

0 comments on commit 4eb6da3

Please sign in to comment.