complete-cli 1.1.0 → 1.1.2

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.
@@ -24,7 +24,7 @@ export async function createProject(projectName, authorName, projectPath, create
24
24
  await createPackageMetadataJSON(projectPath);
25
25
  }
26
26
  await installNodeModules(projectPath, skipInstall, packageManager);
27
- await formatFiles(projectPath);
27
+ await formatFiles(projectPath, packageManager);
28
28
  // Only make the initial commit once all of the files have been copied and formatted.
29
29
  await initGitRepository(projectPath, gitRemoteURL);
30
30
  promptLog(`Successfully created project: ${chalk.green(projectName)}`);
@@ -167,7 +167,9 @@ async function installNodeModules(projectPath, skipInstall, packageManager) {
167
167
  promptError("Exiting.");
168
168
  }
169
169
  }
170
- async function formatFiles(projectPath) {
170
+ async function formatFiles(projectPath, packageManager) {
171
171
  const $$q = $q({ cwd: projectPath });
172
- await $$q `prettier --write ${projectPath}`;
172
+ await (packageManager === PackageManager.bun
173
+ ? $$q `bunx prettier --write .`
174
+ : $$q `prettier --write .`);
173
175
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "complete-cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "A command line tool for bootstrapping TypeScript projects.",
5
5
  "keywords": [
6
6
  "typescript"
@@ -60,7 +60,7 @@ export async function createProject(
60
60
  }
61
61
 
62
62
  await installNodeModules(projectPath, skipInstall, packageManager);
63
- await formatFiles(projectPath);
63
+ await formatFiles(projectPath, packageManager);
64
64
 
65
65
  // Only make the initial commit once all of the files have been copied and formatted.
66
66
  await initGitRepository(projectPath, gitRemoteURL);
@@ -253,7 +253,13 @@ async function installNodeModules(
253
253
  }
254
254
  }
255
255
 
256
- async function formatFiles(projectPath: string) {
256
+ async function formatFiles(
257
+ projectPath: string,
258
+ packageManager: PackageManager,
259
+ ) {
257
260
  const $$q = $q({ cwd: projectPath });
258
- await $$q`prettier --write ${projectPath}`;
261
+
262
+ await (packageManager === PackageManager.bun
263
+ ? $$q`bunx prettier --write .`
264
+ : $$q`prettier --write .`);
259
265
  }