@ktjs/babel-plugin-ktjsx 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PluginObj } from '@babel/core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Transform `<svg ...>` and `<math ...>` JSX elements to include a special attribute flag
|
|
4
|
+
*/
|
|
5
|
+
export default function babelKTjsx(): PluginObj;
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiBxC;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,IAAI,SAAS,CAwF9C"}
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,11 @@ function isSvgTag(tag) {
|
|
|
7
7
|
function isMathTag(tag) {
|
|
8
8
|
return tag === 'math' || (typeof tag === 'string' && tag.startsWith('math:'));
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
//_: any, options: KTJSXPluginOptions
|
|
11
|
+
/**
|
|
12
|
+
* Transform `<svg ...>` and `<math ...>` JSX elements to include a special attribute flag
|
|
13
|
+
*/
|
|
14
|
+
export default function babelKTjsx() {
|
|
11
15
|
return {
|
|
12
16
|
name: 'babel-plugin-ktjsx',
|
|
13
17
|
visitor: {
|
|
@@ -90,4 +94,3 @@ export default function babelPluginKtjsx(_, options) {
|
|
|
90
94
|
},
|
|
91
95
|
};
|
|
92
96
|
}
|
|
93
|
-
export { babelPluginKtjsx };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ktjs/babel-plugin-ktjsx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@babel/core": "^7.0.0"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
-
"build": "
|
|
33
|
+
"build": "node build.js",
|
|
34
34
|
"test": "node tests/run.js"
|
|
35
35
|
}
|
|
36
36
|
}
|