Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Commit

Permalink
Maintenance update (2.0.9)
Browse files Browse the repository at this point in the history
  • Loading branch information
akyoto committed Oct 3, 2017
1 parent cd3e8cf commit 7396d62
Show file tree
Hide file tree
Showing 5 changed files with 740 additions and 154 deletions.
17 changes: 5 additions & 12 deletions lib/App/minifyScripts.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
const uglifyJS = require('uglify-es')

const uglifyJSOptions = {
fromString: true,
compress: {
screw_ie8: true
},
mangle: {
screw_ie8: true
}
toplevel: true,
ie8: false
}

let minify = function(source, file) {
// Minify
source = uglifyJS.minify(source, Object.assign({
parse: {
filename: file
}
}, uglifyJSOptions)).code
source = uglifyJS.minify({
[file]: source
}, uglifyJSOptions).code

return source
}
Expand Down
5 changes: 4 additions & 1 deletion lib/App/routeScripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ module.exports = function() {
// Headers
const compressedScriptsHeaders = {
'Content-Type': 'application/javascript',
'Cache-Control': 'max-age=864000'
'Cache-Control': 'must-revalidate'
}

if(this.production)
compressedScriptsHeaders['Cache-Control'] = 'max-age=864000'

// Compress
let compressedScripts = null
try {
Expand Down
5 changes: 4 additions & 1 deletion lib/App/routeStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ module.exports = function() {
// Headers
const compressedStylesHeaders = {
'Content-Type': 'text/css',
'Cache-Control': 'max-age=864000'
'Cache-Control': 'must-revalidate'
}

if(this.production)
compressedStylesHeaders['Cache-Control'] = 'max-age=864000'

// Compress
let compressedStyles = null
try {
Expand Down
Loading

0 comments on commit 7396d62

Please sign in to comment.