@danielx/civet 0.7.3 → 0.7.5
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/astro.js +6 -6
- package/dist/babel-plugin.mjs +4 -2
- package/dist/browser.js +260 -158
- package/dist/bun-civet.mjs +4 -4
- package/dist/civet +4 -4
- package/dist/config.js +4 -1
- package/dist/esbuild-plugin.js +1 -1
- package/dist/esbuild.js +6 -6
- package/dist/esm.mjs +1 -1
- package/dist/main.js +261 -158
- package/dist/main.mjs +260 -158
- package/dist/rollup.js +6 -6
- package/dist/types.d.ts +15 -5
- package/dist/unplugin-shared.mjs +6 -6
- package/dist/unplugin.js +6 -6
- package/dist/vite.js +6 -6
- package/dist/webpack.js +6 -6
- package/package.json +2 -2
package/dist/astro.js
CHANGED
|
@@ -166,9 +166,9 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
166
166
|
const compiledTS = import_civet.default.compile(rawCivetSource, {
|
|
167
167
|
filename,
|
|
168
168
|
js: false,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
comptime: Boolean(options.comptime),
|
|
170
|
+
sync: true
|
|
171
|
+
// TS readFile API seems to need to be synchronous
|
|
172
172
|
});
|
|
173
173
|
fsMap.set(filename, compiledTS);
|
|
174
174
|
return compiledTS;
|
|
@@ -321,12 +321,12 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
321
321
|
}
|
|
322
322
|
};
|
|
323
323
|
if (options.ts === "civet" && !transformTS) {
|
|
324
|
-
compiled = import_civet.default.compile(rawCivetSource, {
|
|
324
|
+
compiled = await import_civet.default.compile(rawCivetSource, {
|
|
325
325
|
...civetOptions,
|
|
326
326
|
js: true
|
|
327
327
|
});
|
|
328
328
|
} else {
|
|
329
|
-
const compiledTS = import_civet.default.compile(rawCivetSource, {
|
|
329
|
+
const compiledTS = await import_civet.default.compile(rawCivetSource, {
|
|
330
330
|
...civetOptions,
|
|
331
331
|
js: false
|
|
332
332
|
});
|
|
@@ -372,7 +372,7 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
372
372
|
}
|
|
373
373
|
case "civet":
|
|
374
374
|
default: {
|
|
375
|
-
compiled = import_civet.default.compile(rawCivetSource, {
|
|
375
|
+
compiled = await import_civet.default.compile(rawCivetSource, {
|
|
376
376
|
...civetOptions,
|
|
377
377
|
js: true
|
|
378
378
|
});
|
package/dist/babel-plugin.mjs
CHANGED
|
@@ -20,10 +20,12 @@ export default function (api, civetOptions) {
|
|
|
20
20
|
parserOverride(code, opts, parse) {
|
|
21
21
|
let src
|
|
22
22
|
if (opts.sourceFileName.endsWith(".civet")) {
|
|
23
|
-
const config =
|
|
23
|
+
const config = {
|
|
24
|
+
...civetOptions,
|
|
24
25
|
filename: opts.sourceFileName,
|
|
25
26
|
sourceMap: false,
|
|
26
|
-
|
|
27
|
+
sync: true, // parserOverride API is synchronous
|
|
28
|
+
}
|
|
27
29
|
|
|
28
30
|
config.inlineMap ??= true
|
|
29
31
|
config.js = true
|