Skip to content

Commit

Permalink
Bump dependencies and minor fix for inlineStyles
Browse files Browse the repository at this point in the history
  • Loading branch information
GreLI committed Oct 22, 2017
1 parent 2523799 commit d828a62
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/css-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function flattenToSelectors(cssAst) {
var atrule = this.atrule;
var rule = node;

node.selector.children.each(function(selectorNode, selectorItem) {
node.prelude.children.each(function(selectorNode, selectorItem) {
var selector = {
item: selectorItem,
atrule: atrule,
Expand Down
26 changes: 12 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,26 @@
"jshint": "jshint --show-non-errors ."
},
"dependencies": {
"coa": "~1.0.1",
"coa": "~2.0.0",
"colors": "~1.1.2",
"css-select": "^1.3.0-rc0",
"css-select-base-adapter": "^0.1.0",
"css-tree": "1.0.0-alpha22",
"csso": "^3.0.1",
"js-yaml": "~3.7.0",
"mkdirp": "~0.5.1",
"css-select": "~1.3.0-rc0",
"css-select-base-adapter": "~0.1.0",
"css-tree": "~1.0.0-alpha25",
"csso": "^3.3.1",
"js-yaml": "~3.10.0",
"object.values": "^1.0.4",
"sax": "~1.2.1",
"stable": "^0.1.5",
"whet.extend": "~0.9.9",
"sax": "~1.2.4",
"stable": "~0.1.6",
"util.promisify": "~1.0.0"
},
"devDependencies": {
"coveralls": "~2.11.14",
"fs-extra": "~4.0.1",
"coveralls": "~3.0.0",
"fs-extra": "~4.0.2",
"istanbul": "~0.4.5",
"mocha": "~3.2.0",
"mocha": "~4.0.1",
"mocha-istanbul": "~0.3.0",
"mock-stdin": "~0.3.1",
"should": "11.2.0"
"should": "~13.1.2"
},
"engines": {
"node": ">=4.0.0"
Expand Down
8 changes: 4 additions & 4 deletions plugins/inlineStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ exports.fn = function(document, opts) {
parseCustomProperty: false
});
} catch (parseError) {
console.warn('Warning: Parse error of styles of <style/> element, skipped. Error details: ' + parseError);
// console.warn('Warning: Parse error of styles of <style/> element, skipped. Error details: ' + parseError);
continue;
}

Expand Down Expand Up @@ -109,7 +109,7 @@ exports.fn = function(document, opts) {
selectedEls = document.querySelectorAll(selectorStr);
} catch (selectError) {
if (selectError.constructor === SyntaxError) {
console.warn('Warning: Syntax error when trying to select \n\n' + selectorStr + '\n\n, skipped. Error details: ' + selectError);
// console.warn('Warning: Syntax error when trying to select \n\n' + selectorStr + '\n\n, skipped. Error details: ' + selectError);
continue;
}
throw selectError;
Expand Down Expand Up @@ -159,7 +159,7 @@ exports.fn = function(document, opts) {

if (opts.removeMatchedSelectors && selector.selectedEls !== null && selector.selectedEls.length > 0) {
// clean up matching simple selectors if option removeMatchedSelectors is enabled
selector.rule.selector.children.remove(selector.item);
selector.rule.prelude.children.remove(selector.item);
}
}

Expand Down Expand Up @@ -205,7 +205,7 @@ exports.fn = function(document, opts) {

// clean up <style/> rulesets without any css selectors left
if (node.type === 'Rule' &&
node.selector.children.isEmpty()) {
node.prelude.children.isEmpty()) {
list.remove(item);
}
});
Expand Down
7 changes: 6 additions & 1 deletion test/plugins/inlineStyles.14.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d828a62

Please sign in to comment.