@danielx/civet 0.5.51 → 0.5.53

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/civet CHANGED
@@ -38,6 +38,7 @@ Options:
38
38
  --js Strip out all type annotations; default to .jsx extension
39
39
  --ast Print the AST instead of the compiled code
40
40
  --inline-map Generate a sourcemap
41
+ --no-cache Disable compiler caching (slow, for debugging)
41
42
 
42
43
  You can use - to read from stdin or (prefixed by -o) write to stdout.
43
44
 
@@ -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,