Skip to content

Commit

Permalink
Add document.lang (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
gucong3000 committed Jun 19, 2018
1 parent 1d8ce21 commit 4982ee1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";
const extract = require("./extract");
const syntax = require("postcss-syntax/syntax")(extract);
const syntax = require("postcss-syntax/syntax")(extract, "jsx");

module.exports = syntax;
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-jsx",
"version": "0.28.0",
"version": "0.30.0",
"description": "PostCSS syntax for parsing CSS in JS literals",
"repository": {
"type": "git",
Expand Down Expand Up @@ -45,14 +45,14 @@
"@babel/parser": "^7.0.0-beta.49",
"@babel/traverse": "^7.0.0-beta.49",
"@babel/types": "^7.0.0-beta.49",
"postcss-styled": ">=0.28.0"
"postcss-styled": ">=0.30.0"
},
"peerDependencies": {
"postcss": ">=5.0.0",
"postcss-syntax": ">=0.28.0"
"postcss-syntax": ">=0.30.0"
},
"devDependencies": {
"autoprefixer": "^8.6.2",
"autoprefixer": "^8.6.3",
"chai": "^4.1.2",
"codecov": "^3.0.2",
"json5": "^1.0.1",
Expand All @@ -61,6 +61,6 @@
"postcss": "^6.0.22",
"postcss-parser-tests": "^6.2.1",
"postcss-safe-parser": "^3.0.1",
"postcss-syntax": ">=0.28.0"
"postcss-syntax": ">=0.30.0"
}
}
1 change: 1 addition & 0 deletions test/non-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe("non-style js files", () => {
const document = syntax.parse(code, {
from: file,
});
expect(document.source).to.haveOwnProperty("lang", "jsx");
expect(document.toString(), code.toString());
});
});
Expand Down

0 comments on commit 4982ee1

Please sign in to comment.