create-disposabl-app 0.2.0 → 0.2.1

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/index.js +5 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { fileURLToPath } from "node:url";
8
8
  import { Command, CommanderError } from "commander";
9
9
  import * as p2 from "@clack/prompts";
10
10
  // package.json
11
- var version = "0.2.0";
11
+ var version = "0.2.1";
12
12
 
13
13
  // options.ts
14
14
  var platforms = [
@@ -506,7 +506,8 @@ async function main() {
506
506
  try {
507
507
  if (spawnSync("git", ["--version"], { stdio: "ignore" }).status !== 0)
508
508
  throw new Error("Install Git first to create the app's initial commit.");
509
- if (!options.skipInstall && spawnSync("bun", ["--version"], { stdio: "ignore" }).status !== 0)
509
+ const hasBun = spawnSync("bun", ["--version"], { stdio: "ignore" }).status === 0;
510
+ if (!options.skipInstall && !hasBun)
510
511
  throw new Error("Install Bun first, or pass --skip-install to create the files only.");
511
512
  const template = fileURLToPath(new URL("./templates/default", import.meta.url));
512
513
  await createApp(template, directory, name, config, overwrite);
@@ -515,6 +516,8 @@ async function main() {
515
516
  setup?.installing();
516
517
  await install(directory, Boolean(setup?.live));
517
518
  }
519
+ if (hasBun)
520
+ execFileSync("bun", ["fmt"], { cwd: directory, stdio: "pipe" });
518
521
  setup?.finish({
519
522
  installation: options.skipInstall ? "Skipped" : "Complete"
520
523
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-disposabl-app",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Create a Disposabl app",
5
5
  "type": "module",
6
6
  "license": "MIT",