Skip to content

Commit

Permalink
upgrade standard to v15
Browse files Browse the repository at this point in the history
  • Loading branch information
ztoben committed Oct 28, 2020
1 parent 88116ce commit 0ef47a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions lib/output/createOutputWriter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const _ = require('lodash')

const error = require('../utils/error')

function orderAssets (assets, options) {
return options.manifestFirst ? Object.assign({}, ...Object.keys(assets).map(i => ({ [i]: assets[i] })).sort((a, b) => {
function sortAssets (assets) {
return Object.keys(assets).map(i => ({ [i]: assets[i] })).sort((a, b) => {
if (a.manifest) {
return -1
}
Expand All @@ -15,7 +15,13 @@ function orderAssets (assets, options) {
}

return 0
})) : assets
})
}

function orderAssets (assets, options) {
return options.manifestFirst
? Object.assign({}, ...sortAssets(assets))
: assets
}

module.exports = function (options) {
Expand All @@ -34,7 +40,8 @@ module.exports = function (options) {
function mkdirCallback (err) {
if (err) handleMkdirError(err)

const outputPath = options.keepInMemory ? localFs.join(options.path, options.filename)
const outputPath = options.keepInMemory
? localFs.join(options.path, options.filename)
: path.join(options.path, options.filename)

localFs.readFile(outputPath, 'utf8', function (err, data) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"mocha": "8.2.0",
"rimraf": "3.0.2",
"snazzy": "9.0.0",
"standard": "14.3.4",
"standard": "15.0.1",
"style-loader": "2.0.0",
"webpack": "5.3.0"
},
Expand Down

0 comments on commit 0ef47a9

Please sign in to comment.