mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
refactor: shorten steps by using dedicated step, and test underlying micro steps
This commit is contained in:
parent
dda10b25fb
commit
ed01ba8036
5 changed files with 183 additions and 119 deletions
|
|
@ -777,14 +777,14 @@ ${tiddler.content}
|
|||
if (!await fs.pathExists(mainWikiPath)) {
|
||||
await fs.copy(templatePath, mainWikiPath);
|
||||
// Remove .git from template
|
||||
await fs.remove(path.join(mainWikiPath, '.git')).catch(() => { /* ignore */ });
|
||||
await fs.remove(path.join(mainWikiPath, '.git')).catch(() => {/* ignore */});
|
||||
}
|
||||
|
||||
// 4. Update settings.json with both main wiki and sub-wiki workspaces
|
||||
await fs.ensureDir(settingsDirectory);
|
||||
let settings: { workspaces?: Record<string, IWorkspace> } & Record<string, unknown> = {};
|
||||
if (await fs.pathExists(settingsPath)) {
|
||||
settings = await fs.readJson(settingsPath);
|
||||
settings = await fs.readJson(settingsPath) as { workspaces?: Record<string, IWorkspace> };
|
||||
}
|
||||
|
||||
// Generate unique IDs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue