@danielx/civet 0.5.51 → 0.5.52
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/browser.js +602 -465
- package/dist/esbuild-plugin.js +1 -1
- package/dist/esm.mjs +5 -5
- package/dist/main.js +602 -465
- package/dist/main.mjs +602 -465
- package/package.json +1 -1
package/dist/esbuild-plugin.js
CHANGED
|
@@ -16,7 +16,7 @@ esbuild.build({
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
const { readFile } = require('fs/promises')
|
|
19
|
-
const path = require('path')
|
|
19
|
+
const path = require('path');
|
|
20
20
|
|
|
21
21
|
// NOTE: this references the built version of the module, not the source
|
|
22
22
|
const { compile } = require("../dist/main.js")
|
package/dist/esm.mjs
CHANGED
|
@@ -9,15 +9,15 @@ node --loader ts-node/esm --loader @danielx/civet/esm source.civet
|
|
|
9
9
|
```
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { readFileSync } from "fs"
|
|
13
|
-
import { createRequire } from "module"
|
|
12
|
+
import { readFileSync } from "fs";
|
|
13
|
+
import { createRequire } from "module";
|
|
14
14
|
import { pathToFileURL, fileURLToPath } from "url"
|
|
15
15
|
|
|
16
16
|
import sourceMapSupport from "@cspotcode/source-map-support"
|
|
17
17
|
|
|
18
18
|
// NOTE: this references the built version of the module, not the source
|
|
19
|
-
import Civet from "../dist/main.js"
|
|
20
|
-
const { compile, util } = Civet
|
|
19
|
+
import Civet from "../dist/main.js";
|
|
20
|
+
const { compile, util } = Civet;
|
|
21
21
|
const { SourceMap } = util
|
|
22
22
|
|
|
23
23
|
const baseURL = pathToFileURL(process.cwd() + '/').href
|
|
@@ -78,7 +78,7 @@ export function resolve(specifier, context, next) {
|
|
|
78
78
|
export async function load(url, context, next) {
|
|
79
79
|
if (context.format === "civet") {
|
|
80
80
|
const path = fileURLToPath(url)
|
|
81
|
-
const source = readFileSync(path, "utf8")
|
|
81
|
+
const source = readFileSync(path, "utf8");
|
|
82
82
|
const {code: tsSource, sourceMap} = compile(source, {
|
|
83
83
|
filename: path,
|
|
84
84
|
sourceMap: true,
|