@akanjs/cli 0.0.52 → 0.0.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.
Files changed (2) hide show
  1. package/index.js +11 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -4218,13 +4218,18 @@ page.tsx_end
4218
4218
  const pkgJson = pkg.readJson("package.json");
4219
4219
  const dependencies = buildResult.outputFiles ? extractDependencies(buildResult.outputFiles, rootPackageJson) : {};
4220
4220
  const pkgPackageJson = { ...pkgJson, main: "./index.js", engines: { node: ">=22" }, dependencies };
4221
+ if (buildResult.outputFiles)
4222
+ buildResult.outputFiles.map((file) => distPkg.writeFile(file.path, file.text));
4221
4223
  if (["@akanjs/next", "@akanjs/common"].includes(pkg.name)) {
4222
- const files = await import_promises3.default.readdir(pkg.cwdPath);
4223
- const tsFiles = files.filter((file) => file.endsWith(".ts") || file.endsWith(".tsx"));
4224
- await Promise.all(tsFiles.map((file) => import_promises3.default.cp(`${pkg.cwdPath}/${file}`, `${distPkg.cwdPath}/${file}`)));
4225
- } else {
4226
- if (buildResult.outputFiles)
4227
- buildResult.outputFiles.map((file) => distPkg.writeFile(file.path, file.text));
4224
+ buildResult = await esbuild2.build({
4225
+ write: true,
4226
+ entryPoints: [`${pkg.cwdPath}/index.ts`],
4227
+ bundle: false,
4228
+ packages: "external",
4229
+ format: "esm",
4230
+ outdir: distPkg.cwdPath,
4231
+ logLevel: "error"
4232
+ });
4228
4233
  }
4229
4234
  distPkg.writeJson("package.json", pkgPackageJson);
4230
4235
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "@akanjs/cli",
4
- "version": "0.0.52",
4
+ "version": "0.0.53",
5
5
  "bin": {
6
6
  "akan": "index.js"
7
7
  },