@danielx/civet 0.7.1 → 0.7.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/dist/astro.js +17 -10
- package/dist/browser.js +15556 -16016
- package/dist/civet +36 -26
- package/dist/config.js +37 -18
- package/dist/esbuild-plugin.js +2 -2
- package/dist/esbuild.js +17 -10
- package/dist/esm.mjs +2 -2
- package/dist/main.js +15545 -16005
- package/dist/main.mjs +15520 -15983
- package/dist/rollup.js +17 -10
- package/dist/types.d.ts +1 -0
- package/dist/unplugin-shared.mjs +17 -10
- package/dist/unplugin.d.mts +1 -0
- package/dist/unplugin.d.ts +1 -0
- package/dist/unplugin.js +17 -10
- package/dist/vite.js +17 -10
- package/dist/webpack.js +17 -10
- package/package.json +3 -4
package/dist/astro.js
CHANGED
|
@@ -165,7 +165,10 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
165
165
|
});
|
|
166
166
|
const compiledTS = import_civet.default.compile(rawCivetSource, {
|
|
167
167
|
filename,
|
|
168
|
-
js: false
|
|
168
|
+
js: false,
|
|
169
|
+
parseOptions: {
|
|
170
|
+
comptime: Boolean(options.comptime)
|
|
171
|
+
}
|
|
169
172
|
});
|
|
170
173
|
fsMap.set(filename, compiledTS);
|
|
171
174
|
return compiledTS;
|
|
@@ -310,17 +313,22 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
310
313
|
const rawCivetSource = await fs.promises.readFile(filename, "utf-8");
|
|
311
314
|
this.addWatchFile(filename);
|
|
312
315
|
let compiled;
|
|
316
|
+
const civetOptions = {
|
|
317
|
+
filename: id,
|
|
318
|
+
sourceMap: true,
|
|
319
|
+
parseOptions: {
|
|
320
|
+
comptime: Boolean(options.comptime)
|
|
321
|
+
}
|
|
322
|
+
};
|
|
313
323
|
if (options.ts === "civet" && !transformTS) {
|
|
314
324
|
compiled = import_civet.default.compile(rawCivetSource, {
|
|
315
|
-
|
|
316
|
-
js: true
|
|
317
|
-
sourceMap: true
|
|
325
|
+
...civetOptions,
|
|
326
|
+
js: true
|
|
318
327
|
});
|
|
319
328
|
} else {
|
|
320
329
|
const compiledTS = import_civet.default.compile(rawCivetSource, {
|
|
321
|
-
|
|
322
|
-
js: false
|
|
323
|
-
sourceMap: true
|
|
330
|
+
...civetOptions,
|
|
331
|
+
js: false
|
|
324
332
|
});
|
|
325
333
|
const resolved = filename + outExt;
|
|
326
334
|
sourceMaps.set(
|
|
@@ -365,9 +373,8 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
365
373
|
case "civet":
|
|
366
374
|
default: {
|
|
367
375
|
compiled = import_civet.default.compile(rawCivetSource, {
|
|
368
|
-
|
|
369
|
-
js: true
|
|
370
|
-
sourceMap: true
|
|
376
|
+
...civetOptions,
|
|
377
|
+
js: true
|
|
371
378
|
});
|
|
372
379
|
if (options.ts == void 0) {
|
|
373
380
|
console.log(
|