@backtickjs/jsx-react 0.2.1 → 0.2.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/plugin.d.ts +3 -2
- package/dist/plugin.js +3 -4
- package/dist/plugin.js.map +1 -1
- package/package.json +7 -7
- package/src/plugin.ts +3 -5
package/dist/plugin.d.ts
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
* as calls of `react/jsx-runtime`'s `jsx`, written by TypeScript's own
|
|
4
4
|
* `react-jsx` emit. Typed by its shape, which is the compiler's `Plugin`, so
|
|
5
5
|
* this package needn't depend on the compiler.
|
|
6
|
+
*
|
|
7
|
+
* Listed in `package.json`: `"backtick": { "plugins": ["@backtickjs/jsx-react/plugin"] }`.
|
|
6
8
|
*/
|
|
7
|
-
export
|
|
9
|
+
export default function react(): (code: string, id: string) => {
|
|
8
10
|
code: string;
|
|
9
11
|
map: string;
|
|
10
12
|
};
|
|
11
|
-
export default react;
|
package/dist/plugin.js
CHANGED
|
@@ -4,8 +4,10 @@ import ts from "typescript";
|
|
|
4
4
|
* as calls of `react/jsx-runtime`'s `jsx`, written by TypeScript's own
|
|
5
5
|
* `react-jsx` emit. Typed by its shape, which is the compiler's `Plugin`, so
|
|
6
6
|
* this package needn't depend on the compiler.
|
|
7
|
+
*
|
|
8
|
+
* Listed in `package.json`: `"backtick": { "plugins": ["@backtickjs/jsx-react/plugin"] }`.
|
|
7
9
|
*/
|
|
8
|
-
export function react() {
|
|
10
|
+
export default function react() {
|
|
9
11
|
return (code, id) => {
|
|
10
12
|
const { outputText, sourceMapText } = ts.transpileModule(code, {
|
|
11
13
|
fileName: id,
|
|
@@ -22,7 +24,4 @@ export function react() {
|
|
|
22
24
|
};
|
|
23
25
|
};
|
|
24
26
|
}
|
|
25
|
-
// What a project names to compile its scripts for React, in its `package.json`:
|
|
26
|
-
// `"backtick": { "plugins": ["@backtickjs/jsx-react/plugin"] }`.
|
|
27
|
-
export default react;
|
|
28
27
|
//# sourceMappingURL=plugin.js.map
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK;IAI3B,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE;QAClB,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE;YAC7D,QAAQ,EAAE,EAAE;YACZ,eAAe,EAAE;gBACf,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ;gBACxB,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM;gBAC5B,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM;gBAC9B,SAAS,EAAE,IAAI;aAChB;SACF,CAAC,CAAC;QACH,OAAO;YACL,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,8BAA8B,EAAE,EAAE,CAAC;YAC5D,GAAG,EAAE,aAAc;SACpB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtickjs/jsx-react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "React's JSX for Backtick: a JSX runtime for server components, and the compile plugin for scripts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"backtick",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@backtickjs/core": "^0.2.
|
|
52
|
+
"@backtickjs/core": "^0.2.3"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"react": "^19.2.3",
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"typescript": "^6.0.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@backtickjs/bundler": "^0.2.
|
|
61
|
-
"@backtickjs/compiler": "^0.2.
|
|
62
|
-
"@backtickjs/prettier-plugin": "^0.2.
|
|
63
|
-
"@backtickjs/tsc": "^0.2.
|
|
64
|
-
"@backtickjs/tspatch-plugin": "^0.2.
|
|
60
|
+
"@backtickjs/bundler": "^0.2.3",
|
|
61
|
+
"@backtickjs/compiler": "^0.2.3",
|
|
62
|
+
"@backtickjs/prettier-plugin": "^0.2.3",
|
|
63
|
+
"@backtickjs/tsc": "^0.2.3",
|
|
64
|
+
"@backtickjs/tspatch-plugin": "^0.2.3",
|
|
65
65
|
"@types/react": "19.2.18",
|
|
66
66
|
"@types/react-dom": "19.2.7",
|
|
67
67
|
"global-jsdom": "^30.0.0",
|
package/src/plugin.ts
CHANGED
|
@@ -5,8 +5,10 @@ import ts from "typescript";
|
|
|
5
5
|
* as calls of `react/jsx-runtime`'s `jsx`, written by TypeScript's own
|
|
6
6
|
* `react-jsx` emit. Typed by its shape, which is the compiler's `Plugin`, so
|
|
7
7
|
* this package needn't depend on the compiler.
|
|
8
|
+
*
|
|
9
|
+
* Listed in `package.json`: `"backtick": { "plugins": ["@backtickjs/jsx-react/plugin"] }`.
|
|
8
10
|
*/
|
|
9
|
-
export function react(): (
|
|
11
|
+
export default function react(): (
|
|
10
12
|
code: string,
|
|
11
13
|
id: string,
|
|
12
14
|
) => { code: string; map: string } {
|
|
@@ -26,7 +28,3 @@ export function react(): (
|
|
|
26
28
|
};
|
|
27
29
|
};
|
|
28
30
|
}
|
|
29
|
-
|
|
30
|
-
// What a project names to compile its scripts for React, in its `package.json`:
|
|
31
|
-
// `"backtick": { "plugins": ["@backtickjs/jsx-react/plugin"] }`.
|
|
32
|
-
export default react;
|