Skip to content

Commit e1fe2b5

Browse files
authored
Add support for style.opts (#37)
1 parent edc1b75 commit e1fe2b5

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-syntax",
3-
"version": "0.34.0",
3+
"version": "0.36.0",
44
"description": "Automatically switch PostCSS syntax by file extensions",
55
"repository": {
66
"type": "git",
@@ -85,15 +85,15 @@
8585
"postcss": ">=5.0.0"
8686
},
8787
"devDependencies": {
88-
"chai": "^4.1.2",
88+
"chai": "^4.2.0",
8989
"codecov": "^3.1.0",
9090
"mocha": "^5.2.0",
91-
"nyc": "^13.0.1",
92-
"postcss": "^7.0.2",
93-
"postcss-html": ">=0.34.0",
94-
"postcss-jsx": ">=0.34.0",
95-
"postcss-less": "^2.0.0",
96-
"postcss-markdown": ">=0.34.0",
91+
"nyc": "^13.1.0",
92+
"postcss": "^7.0.7",
93+
"postcss-html": ">=0.36.0",
94+
"postcss-jsx": ">=0.36.0",
95+
"postcss-less": "^3.1.0",
96+
"postcss-markdown": ">=0.36.0",
9797
"postcss-safe-parser": "^4.0.1",
9898
"postcss-scss": "^2.0.0",
9999
"proxyquire": "^2.1.0",

parse-style.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,14 @@ class LocalFixer {
5656
try {
5757
root = syntax.parse(style.content, Object.assign({}, opts, {
5858
map: false,
59-
}));
59+
}, style.opts));
6060
} catch (error) {
6161
if (style.ignoreErrors) {
6262
return;
63-
} else if (style.skipConvert) {
64-
throw error;
65-
} else {
66-
throw this.error(error);
63+
} else if (!style.skipConvert) {
64+
this.error(error);
6765
}
66+
throw error;
6867
}
6968
if (!style.skipConvert) {
7069
this.root(root);

0 commit comments

Comments
 (0)