Skip to content

Commit

Permalink
Renable minification
Browse files Browse the repository at this point in the history
  • Loading branch information
NickColley committed Jan 21, 2019
1 parent 7251d6c commit 82f7b3e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions lib/metalsmith.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const postcss = require('metalsmith-postcss')
const rollup = require('metalsmith-rollup') // used to build GOV.UK Frontend JavaScript
const resolve = require('rollup-plugin-node-resolve') // rollup plugin to resolve node_modules
const commonjs = require('rollup-plugin-commonjs') // rollup plugin to convert CommonJS modules to ES2015
// const uglify = require('metalsmith-uglify') // minify the JavaScript assets to reduce time it takes to download
const uglify = require('metalsmith-uglify') // minify the JavaScript assets to reduce time it takes to download

// const debug = require('./debug') // debug plugin
const navigation = require('./navigation.js') // navigation plugin
Expand Down Expand Up @@ -170,20 +170,20 @@ module.exports = metalsmith(__dirname) // __dirname defined by node.js: name of
]
}))

// minify the JavaScript assets to reduce time it takes to download
// .use(uglify({
// uglify: {
// ie8: true
// },
// sameName: true, // overwrite the original files, with the minified ones.
// files: [
// 'javascripts/application-ie8.js',
// 'javascripts/application.js',
// 'javascripts/head-ie8.js',
// 'javascripts/govuk-frontend.js',
// 'javascripts/example.js'
// ]
// }))
// minify the JavaScript assets to reduce time it takes to download
.use(uglify({
uglify: {
ie8: true
},
sameName: true, // overwrite the original files, with the minified ones.
files: [
'javascripts/application-ie8.js',
'javascripts/application.js',
'javascripts/head-ie8.js',
'javascripts/govuk-frontend.js',
'javascripts/example.js'
]
}))

// add hash to files
.use(hashAssets({
Expand Down

0 comments on commit 82f7b3e

Please sign in to comment.