Skip to content
Permalink
Browse files

fix(minifying client json): do not use uglify-js to minify client jso…

…n files, it has issues with quoted json keys
  • Loading branch information
jyounce committed Nov 4, 2015
1 parent a1bc68c commit 2959573d2d51c2ac03b640e0ef37b619c2cb3f11
Showing with 5 additions and 2 deletions.
  1. +5 −2 tasks/minify/minify-js.coffee
@@ -7,9 +7,12 @@ module.exports = (config, gulp) ->
defer = q.defer()
minify = config.minify.js.scripts
minOpts = mangle: config.minify.js.mangle
gulp.src config.glob.dist[appOrRb].client.scripts.all
src = config.glob.dist[appOrRb].client.scripts.all
dest = config.dist[appOrRb].client.scripts.dir
src.push '!**/*.json' # do not minify json files, uglify has issues with quoted keys
gulp.src src
.pipe gulpif minify, minifyJs minOpts
.pipe gulp.dest config.dist[appOrRb].client.scripts.dir
.pipe gulp.dest dest
.on 'end', ->
console.log "minified #{appOrRb} dist scripts".yellow
defer.resolve()

0 comments on commit 2959573

Please sign in to comment.
You can’t perform that action at this time.