@webmate-studio/builder 0.2.23 → 0.2.25
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/build-service.js +3 -8
- package/package.json +3 -2
package/build-service.js
CHANGED
|
@@ -101,14 +101,9 @@ function injectSvelteOptions(filename, content, componentMetadata) {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
// Generate <svelte:options> block
|
|
104
|
-
|
|
105
|
-
const
|
|
106
|
-
customElement={{
|
|
107
|
-
tag: "${tagName}",
|
|
108
|
-
shadow: "none",
|
|
109
|
-
props: ${propsJson}
|
|
110
|
-
}}
|
|
111
|
-
/>\n\n`;
|
|
104
|
+
// IMPORTANT: props must be inline (single line) for Svelte compiler to parse it
|
|
105
|
+
const propsJson = JSON.stringify(props); // No formatting - keep it inline
|
|
106
|
+
const svelteOptions = `<svelte:options customElement={{ tag: "${tagName}", shadow: "none", props: ${propsJson} }} />\n\n`;
|
|
112
107
|
|
|
113
108
|
// Check if <svelte:options> already exists
|
|
114
109
|
if (content.includes('<svelte:options')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webmate-studio/builder",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Webmate Studio Component Builder",
|
|
6
6
|
"keywords": [
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"build-service.js"
|
|
20
20
|
],
|
|
21
21
|
"exports": {
|
|
22
|
-
".": "./src/index.js"
|
|
22
|
+
".": "./src/index.js",
|
|
23
|
+
"./build-service.js": "./build-service.js"
|
|
23
24
|
},
|
|
24
25
|
"bin": {
|
|
25
26
|
"wm-build-service": "./build-service.js"
|