@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/rollup.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(
|
package/dist/types.d.ts
CHANGED
package/dist/unplugin-shared.mjs
CHANGED
|
@@ -132,7 +132,10 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
132
132
|
});
|
|
133
133
|
const compiledTS = civet.compile(rawCivetSource, {
|
|
134
134
|
filename,
|
|
135
|
-
js: false
|
|
135
|
+
js: false,
|
|
136
|
+
parseOptions: {
|
|
137
|
+
comptime: Boolean(options.comptime)
|
|
138
|
+
}
|
|
136
139
|
});
|
|
137
140
|
fsMap.set(filename, compiledTS);
|
|
138
141
|
return compiledTS;
|
|
@@ -277,17 +280,22 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
277
280
|
const rawCivetSource = await fs.promises.readFile(filename, "utf-8");
|
|
278
281
|
this.addWatchFile(filename);
|
|
279
282
|
let compiled;
|
|
283
|
+
const civetOptions = {
|
|
284
|
+
filename: id,
|
|
285
|
+
sourceMap: true,
|
|
286
|
+
parseOptions: {
|
|
287
|
+
comptime: Boolean(options.comptime)
|
|
288
|
+
}
|
|
289
|
+
};
|
|
280
290
|
if (options.ts === "civet" && !transformTS) {
|
|
281
291
|
compiled = civet.compile(rawCivetSource, {
|
|
282
|
-
|
|
283
|
-
js: true
|
|
284
|
-
sourceMap: true
|
|
292
|
+
...civetOptions,
|
|
293
|
+
js: true
|
|
285
294
|
});
|
|
286
295
|
} else {
|
|
287
296
|
const compiledTS = civet.compile(rawCivetSource, {
|
|
288
|
-
|
|
289
|
-
js: false
|
|
290
|
-
sourceMap: true
|
|
297
|
+
...civetOptions,
|
|
298
|
+
js: false
|
|
291
299
|
});
|
|
292
300
|
const resolved = filename + outExt;
|
|
293
301
|
sourceMaps.set(
|
|
@@ -332,9 +340,8 @@ var rawPlugin = (options = {}, meta) => {
|
|
|
332
340
|
case "civet":
|
|
333
341
|
default: {
|
|
334
342
|
compiled = civet.compile(rawCivetSource, {
|
|
335
|
-
|
|
336
|
-
js: true
|
|
337
|
-
sourceMap: true
|
|
343
|
+
...civetOptions,
|
|
344
|
+
js: true
|
|
338
345
|
});
|
|
339
346
|
if (options.ts == void 0) {
|
|
340
347
|
console.log(
|
package/dist/unplugin.d.mts
CHANGED
|
@@ -12,6 +12,7 @@ type PluginOptions = {
|
|
|
12
12
|
js?: boolean;
|
|
13
13
|
/** @deprecated Use "emitDeclaration" instead */
|
|
14
14
|
dts?: boolean;
|
|
15
|
+
comptime?: boolean;
|
|
15
16
|
};
|
|
16
17
|
declare function slash(p: string): string;
|
|
17
18
|
declare const rawPlugin: Parameters<typeof createUnplugin<PluginOptions>>[0];
|
package/dist/unplugin.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ type PluginOptions = {
|
|
|
12
12
|
js?: boolean;
|
|
13
13
|
/** @deprecated Use "emitDeclaration" instead */
|
|
14
14
|
dts?: boolean;
|
|
15
|
+
comptime?: boolean;
|
|
15
16
|
};
|
|
16
17
|
declare function slash(p: string): string;
|
|
17
18
|
declare const rawPlugin: Parameters<typeof createUnplugin<PluginOptions>>[0];
|
package/dist/unplugin.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(
|
package/dist/vite.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(
|
package/dist/webpack.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(
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielx/civet",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.2",
|
|
5
5
|
"description": "CoffeeScript style syntax for TypeScript",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/main.mjs",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"unplugin": "^1.6.0"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@danielx/civet": "0.
|
|
78
|
-
"@danielx/hera": "^0.8.
|
|
77
|
+
"@danielx/civet": "0.7.1",
|
|
78
|
+
"@danielx/hera": "^0.8.13",
|
|
79
79
|
"@prettier/sync": "^0.3.0",
|
|
80
80
|
"@types/assert": "^1.5.6",
|
|
81
81
|
"@types/mocha": "^9.1.1",
|
|
@@ -128,7 +128,6 @@
|
|
|
128
128
|
"coffee"
|
|
129
129
|
],
|
|
130
130
|
"loader": [
|
|
131
|
-
"ts-node/esm",
|
|
132
131
|
"@danielx/hera/esm",
|
|
133
132
|
"./node_modules/@danielx/civet/dist/esm.mjs"
|
|
134
133
|
],
|