プロジェクト初期化時に.gitignoreを含める
This commit is contained in:
parent
f3422e21d1
commit
4a66b6bd15
@ -17,6 +17,7 @@ import { Command } from 'commander';
|
||||
import { resolve } from 'node:path';
|
||||
import {
|
||||
initGlobalDirs,
|
||||
initProjectDirs,
|
||||
loadGlobalConfig,
|
||||
getEffectiveDebugConfig,
|
||||
} from './config/index.js';
|
||||
@ -53,6 +54,9 @@ program
|
||||
// Initialize global directories first
|
||||
await initGlobalDirs();
|
||||
|
||||
// Initialize project directories (.takt/)
|
||||
initProjectDirs(cwd);
|
||||
|
||||
// Initialize debug logger from config
|
||||
const debugConfig = getEffectiveDebugConfig(cwd);
|
||||
initDebugLogger(debugConfig, cwd);
|
||||
|
||||
@ -14,11 +14,13 @@ import {
|
||||
getGlobalAgentsDir,
|
||||
getGlobalWorkflowsDir,
|
||||
getGlobalLogsDir,
|
||||
getProjectConfigDir,
|
||||
ensureDir,
|
||||
} from './paths.js';
|
||||
import {
|
||||
copyGlobalResourcesToDir,
|
||||
copyLanguageResourcesToDir,
|
||||
copyProjectResourcesToDir,
|
||||
} from '../resources/index.js';
|
||||
import { setLanguage } from './globalConfig.js';
|
||||
|
||||
@ -74,3 +76,14 @@ export async function initGlobalDirs(): Promise<void> {
|
||||
copyGlobalResourcesToDir(getGlobalConfigDir());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize project-level .takt directory.
|
||||
* Creates .takt/ and copies project resources (e.g., .gitignore).
|
||||
* Only copies files that don't exist.
|
||||
*/
|
||||
export function initProjectDirs(projectDir: string): void {
|
||||
const configDir = getProjectConfigDir(projectDir);
|
||||
ensureDir(configDir);
|
||||
copyProjectResourcesToDir(configDir);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user