Skip to content

Commit

Permalink
Update deps (#1271)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper De Moor authored and devongovett committed May 1, 2018
1 parent 7cbbeef commit ec98a95
Show file tree
Hide file tree
Showing 5 changed files with 771 additions and 541 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"babel-types": "^6.26.0",
"babylon": "^6.17.4",
"babylon-walk": "^1.0.2",
"browserslist": "^2.11.2",
"browserslist": "^3.2.6",
"chalk": "^2.1.0",
"chokidar": "^2.0.1",
"chokidar": "^2.0.3",
"command-exists": "^1.2.6",
"commander": "^2.11.0",
"cross-spawn": "^6.0.4",
Expand All @@ -34,10 +34,10 @@
"get-port": "^3.2.0",
"glob": "^7.1.2",
"grapheme-breaker": "^0.3.2",
"htmlnano": "^0.1.7",
"htmlnano": "^0.1.9",
"is-url": "^1.2.2",
"js-yaml": "^3.10.0",
"json5": "^0.5.1",
"json5": "^1.0.1",
"micromatch": "^3.0.4",
"mkdirp": "^0.5.1",
"node-forge": "^0.7.1",
Expand All @@ -58,8 +58,8 @@
"toml": "^2.3.3",
"tomlify-j0.4": "^3.0.0",
"uglify-es": "^3.2.1",
"v8-compile-cache": "^1.1.0",
"ws": "^4.0.0"
"v8-compile-cache": "^2.0.0",
"ws": "^5.1.1"
},
"devDependencies": {
"@vue/component-compiler-utils": "^1.0.0",
Expand All @@ -78,18 +78,18 @@
"graphql-tag": "^2.6.0",
"husky": "^0.14.3",
"less": "^3.0.1",
"lint-staged": "^6.0.0",
"mocha": "^3.5.0",
"lint-staged": "^7.0.5",
"mocha": "^5.1.1",
"ncp": "^2.0.0",
"nib": "^1.1.2",
"node-sass": "^4.7.2",
"nyc": "^11.1.0",
"postcss-modules": "^0.8.0",
"postcss-modules": "^1.1.0",
"posthtml-include": "^1.1.0",
"prettier": "^1.9.1",
"pug": "^2.0.3",
"rimraf": "^2.6.1",
"sinon": "^4.2.2",
"sinon": "^5.0.1",
"sourcemap-validator": "^1.0.6",
"stylus": "^0.54.5",
"typescript": "^2.7.0",
Expand Down
12 changes: 4 additions & 8 deletions src/transforms/htmlnano.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ const htmlnano = require('htmlnano');
module.exports = async function(asset) {
await asset.parseIfNeeded();

const htmlNanoConfig = asset.package.htmlnano ||
(await asset.getConfig(['.htmlnanorc', '.htmlnanorc.js'])) || {
collapseWhitespace: 'conservative',
removeRedundantAttributes: false,
minifyCss: {
safe: true
}
};
const htmlNanoConfig =
asset.package.htmlnano ||
(await asset.getConfig(['.htmlnanorc', '.htmlnanorc.js'])) ||
{};

let res = await posthtml([htmlnano(htmlNanoConfig)]).process(asset.ast, {
skipParse: true
Expand Down
3 changes: 2 additions & 1 deletion test/integration/htmlnano-config/.htmlnanorc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
mergeStyles: true,
minifySvg: false,
minifyJson: true
minifyJson: true,
collapseWhitespace: "all"
}
1 change: 1 addition & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
--timeout 50000
--require ./test/babel-register
--exit
Loading

0 comments on commit ec98a95

Please sign in to comment.