xpine 0.0.1 → 0.0.2
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/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xpine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"main": "index.mjs",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@tailwindcss/postcss": "^4.0.8",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"typescript": "^5.7.3"
|
|
21
21
|
},
|
|
22
22
|
"bin": {
|
|
23
|
-
"xpine-build": "
|
|
23
|
+
"xpine-build": "src/scripts/build.mjs"
|
|
24
24
|
},
|
|
25
25
|
"type": "module"
|
|
26
26
|
}
|
package/src/build.mjs
CHANGED
|
@@ -85,7 +85,7 @@ async function buildAppFiles(files, isDev) {
|
|
|
85
85
|
setup(build) {
|
|
86
86
|
build.onLoad({ filter: /.tsx/, }, args => {
|
|
87
87
|
const cleanedContent = removeClientScriptInTSXFile(args.path);
|
|
88
|
-
const htmlImportStart = 'import html from \'
|
|
88
|
+
const htmlImportStart = 'import { html } from \'xpine\';\n';
|
|
89
89
|
const newContent = `${htmlImportStart}${cleanedContent.content}`;
|
|
90
90
|
componentData.push({
|
|
91
91
|
...args,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export class html {
|
|
2
2
|
|
|
3
3
|
static attributeObjectToString(props) {
|
|
4
4
|
if (!props) return '';
|
|
@@ -26,3 +26,7 @@ export default class HTML {
|
|
|
26
26
|
return `<${type}${this.attributeObjectToString(props)}>${childrenResult.filter(Boolean).join('')}</${type}>`;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
export function JSXRuntime() {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
package/modules/html/.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'html';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'html/jsx-runtime';
|