bun-plugin-stx 0.2.26 → 0.2.29
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.
|
@@ -426,12 +426,12 @@ export { content as default };
|
|
|
426
426
|
output = await processDirectives(output, context, filePath, options, dependencies);
|
|
427
427
|
if (clientScripts.length > 0) {
|
|
428
428
|
const eventBindings = context.__stx_event_bindings || [];
|
|
429
|
-
const transformedScripts = clientScripts.map((fullScript) => {
|
|
429
|
+
const transformedScripts = await Promise.all(clientScripts.map(async (fullScript) => {
|
|
430
430
|
const contentMatch = fullScript.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);
|
|
431
431
|
if (!contentMatch)
|
|
432
432
|
return fullScript;
|
|
433
433
|
return processClientScript(contentMatch[1], { eventBindings, templateContent: output });
|
|
434
|
-
});
|
|
434
|
+
}));
|
|
435
435
|
const scriptsHtml = transformedScripts.join(`
|
|
436
436
|
`);
|
|
437
437
|
const bodyEndMatch = output.match(/(<\/body>)/i);
|
package/dist/index.js
CHANGED
package/dist/preload.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bun-plugin-stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.29",
|
|
5
5
|
"description": "A Bun plugin that allows for using Laravel Blade-like syntax.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
"typecheck": "bun tsc --noEmit"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@stacksjs/stx": "0.2.
|
|
75
|
+
"@stacksjs/stx": "0.2.29"
|
|
76
76
|
}
|
|
77
77
|
}
|