Skip to content

Commit 86719e6

Browse files
committed
Add support for astroturf
1 parent 3d2b14f commit 86719e6

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

extract.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const partSport = {
2323
};
2424

2525
const supports = {
26+
// https://github.com/4Catalyzer/astroturf
27+
astroturf: true,
2628

2729
// https://github.com/emotion-js/emotion
2830
emotion: true,
@@ -193,7 +195,7 @@ function literalParser (source, opts, styles) {
193195
function isStylePath (path) {
194196
const nameSpace = getNameSpace(path, []).filter(Boolean);
195197
if (nameSpace.length) {
196-
if (/^(?:styled|StyleSheet)$/.test(nameSpace[0]) || supports[nameSpace[0]]) {
198+
if (/^(?:css|Styled?)(?:Sheets?)?$/i.test(nameSpace[0]) || supports[nameSpace[0]]) {
197199
return nameSpace;
198200
}
199201

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"debug": "npm run mocha -- --inspect-brk"
4444
},
4545
"dependencies": {
46-
"@babel/core": "^7.0.0"
46+
"@babel/core": "^7.1.2"
4747
},
4848
"optionalDependencies": {
4949
"postcss-styled": ">=0.34.0"
@@ -54,12 +54,12 @@
5454
},
5555
"devDependencies": {
5656
"autoprefixer": "^9.1.5",
57-
"chai": "^4.1.2",
57+
"chai": "^4.2.0",
5858
"codecov": "^3.1.0",
59-
"json5": "^2.0.1",
59+
"json5": "^2.1.0",
6060
"mocha": "^5.2.0",
6161
"nyc": "^13.0.1",
62-
"postcss": "^7.0.2",
62+
"postcss": "^7.0.5",
6363
"postcss-parser-tests": "^6.3.0",
6464
"postcss-safe-parser": "^4.0.1",
6565
"postcss-syntax": ">=0.34.0"

0 commit comments

Comments
 (0)