bun-plugin-stx 0.2.867 → 0.2.869
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// src/index.ts
|
|
3
3
|
import fs2 from "fs";
|
|
4
4
|
import path2 from "path";
|
|
5
|
-
import { buildWebComponents, cacheTemplate, checkCache, classifyAllScripts, defaultConfig, extractVariables, insertBeforeBodyClose, loadStxConfig, processClientScript, processDirectives, readMarkdownFile, withinBundlerCallback } from "@stacksjs/stx";
|
|
5
|
+
import { buildWebComponents, cacheTemplate, checkCache, classifyAllScripts, defaultConfig, extractVariables, findSfcTemplateBlock, insertBeforeBodyClose, loadStxConfig, processClientScript, processDirectives, readMarkdownFile, withinBundlerCallback } from "@stacksjs/stx";
|
|
6
6
|
|
|
7
7
|
// src/watch.ts
|
|
8
8
|
import fs from "fs";
|
|
@@ -390,9 +390,9 @@ export { content as default };
|
|
|
390
390
|
}
|
|
391
391
|
const content = await Bun.file(filePath).text();
|
|
392
392
|
let workingContent = content;
|
|
393
|
-
const
|
|
394
|
-
if (
|
|
395
|
-
workingContent =
|
|
393
|
+
const sfcTemplate = findSfcTemplateBlock(content);
|
|
394
|
+
if (sfcTemplate) {
|
|
395
|
+
workingContent = sfcTemplate.content.trim();
|
|
396
396
|
}
|
|
397
397
|
const classified = classifyAllScripts(content);
|
|
398
398
|
const clientScripts = classified.client.map((s) => s.fullTag);
|
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.869",
|
|
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",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typecheck": "bun tsc --noEmit"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@stacksjs/stx": "0.2.
|
|
78
|
-
"stx-router": "0.2.
|
|
77
|
+
"@stacksjs/stx": "0.2.869",
|
|
78
|
+
"stx-router": "0.2.869"
|
|
79
79
|
}
|
|
80
80
|
}
|