sillyspec 3.7.12 → 3.7.13
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.
- package/package.json +1 -1
- package/src/init.js +2 -2
package/package.json
CHANGED
package/src/init.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, copyFileSync } from 'fs';
|
|
2
|
-
import { join, resolve, dirname } from 'path';
|
|
2
|
+
import { join, resolve, dirname, basename } from 'path';
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
4
|
import { homedir } from 'os';
|
|
5
5
|
import { checkbox, select, confirm, input } from '@inquirer/prompts';
|
|
@@ -209,7 +209,7 @@ async function doInstall(projectDir, tools, isWorkspace, subprojects = []) {
|
|
|
209
209
|
// .sillyspec/.runtime/ → progress (gitignored)
|
|
210
210
|
|
|
211
211
|
// 注册当前项目到 projects/
|
|
212
|
-
const projectName =
|
|
212
|
+
const projectName = basename(projectDir) || 'project';
|
|
213
213
|
const projectsDir = join(projectDir, '.sillyspec', 'projects');
|
|
214
214
|
mkdirSync(projectsDir, { recursive: true });
|
|
215
215
|
const projectYamlPath = join(projectsDir, `${projectName}.yaml`);
|