feature: add projects page (2 parts works)
This commit is contained in:
@@ -49,17 +49,22 @@ if (layer === "shared") {
|
||||
|
||||
const fsdCommand = `fsd ${layer} ${component} ${otherArgs} --segments ${segments} -r src`
|
||||
|
||||
try {
|
||||
runShell(fsdCommand)
|
||||
} catch (error) {
|
||||
console.error(`Ошибка выполнения команды: ${(error as Error).message}`)
|
||||
process.exit(1)
|
||||
if (layer !== "shared") {
|
||||
try {
|
||||
runShell(fsdCommand)
|
||||
} catch (error) {
|
||||
console.error(`Ошибка выполнения команды: ${(error as Error).message}`)
|
||||
process.exit(1)
|
||||
}
|
||||
} else {
|
||||
await mkdir(componentPath, { recursive: true })
|
||||
console.log("Пропущен fsd для shared: создаем компонент вручную")
|
||||
}
|
||||
|
||||
console.log(`Удаление индекс файла: ${componentPath}/index.ts`)
|
||||
|
||||
try {
|
||||
await rm(`${componentPath}/index.ts`)
|
||||
await rm(`${componentPath}/index.ts`, { force: true })
|
||||
} catch (error) {
|
||||
console.error(`Ошибка выполнения команды: ${(error as Error).message}`)
|
||||
process.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user