Skip to content

Commit 90caadf

Browse files
authored
refactor(cli): create an empty yarn.lock file when generating a semahore project with the cli (#828)
refactor(cli): create an empty yarn.lock file when generating a semaphore project with the cli Now devs will be able to install dependencies successfully right after creating a project with the CLI. re #827
1 parent 1e4e63c commit 90caadf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/cli/src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import chalk from "chalk"
44
import { program } from "commander"
55
import decompress from "decompress"
66
import figlet from "figlet"
7-
import { copyFileSync, existsSync, readFileSync, unlinkSync } from "fs"
7+
import { copyFileSync, existsSync, readFileSync, unlinkSync, writeFileSync } from "fs"
88
import logSymbols from "log-symbols"
99
import pacote from "pacote"
1010
import { dirname } from "path"
@@ -100,6 +100,9 @@ program
100100
`${currentDirectory}/${projectDirectory}/.env`
101101
)
102102

103+
// Create an empty yarn.lock file to install dependencies successfully
104+
writeFileSync(`${currentDirectory}/${projectDirectory}/yarn.lock`, "")
105+
103106
spinner.stop()
104107

105108
console.info(`\n ${logSymbols.success}`, `Your project is ready!\n`)

0 commit comments

Comments
 (0)