@batijs/build 0.0.14 → 0.0.16

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.
Files changed (2) hide show
  1. package/dist/exec.js +5 -3
  2. package/package.json +3 -3
package/dist/exec.js CHANGED
@@ -33,21 +33,23 @@ async function* walk(dir, meta) {
33
33
  }
34
34
  function transformFileAfterExec(filepath, fileContent) {
35
35
  const parsed = path.parse(filepath);
36
- switch (parsed.ext) {
36
+ const ext = parsed.ext || parsed.name;
37
+ switch (ext) {
37
38
  case ".ts":
38
39
  case ".js":
39
40
  case ".tsx":
40
41
  case ".jsx":
42
+ case ".env":
41
43
  return fileContent;
42
44
  case ".json":
43
45
  return JSON.stringify(fileContent, null, 2);
44
46
  default:
45
- throw new Error(`Unsupported extension ${parsed.ext} (${filepath})`);
47
+ throw new Error(`Unsupported extension ${ext} (${filepath})`);
46
48
  }
47
49
  }
48
50
  async function fileContainsVikeMeta(filepath) {
49
51
  const code = await readFile(filepath, { encoding: "utf-8" });
50
- return code.includes("import.meta.VIKE_");
52
+ return code.includes("import.meta.BATI_");
51
53
  }
52
54
  async function main(options, meta) {
53
55
  const sources = Array.isArray(options.source) ? options.source : [options.source];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/build",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -8,10 +8,10 @@
8
8
  "license": "MIT",
9
9
  "devDependencies": {
10
10
  "@types/node": "^16.18.27",
11
- "@batijs/tsup": "0.0.14"
11
+ "@batijs/tsup": "0.0.16"
12
12
  },
13
13
  "dependencies": {
14
- "@batijs/core": "0.0.14"
14
+ "@batijs/core": "0.0.16"
15
15
  },
16
16
  "main": "./dist/exec.js",
17
17
  "module": "./dist/exec.js",