プロジェクト初期化時に.gitignoreを含める
This commit is contained in:
parent
f3422e21d1
commit
4a66b6bd15
@ -17,6 +17,7 @@ import { Command } from 'commander';
|
|||||||
import { resolve } from 'node:path';
|
import { resolve } from 'node:path';
|
||||||
import {
|
import {
|
||||||
initGlobalDirs,
|
initGlobalDirs,
|
||||||
|
initProjectDirs,
|
||||||
loadGlobalConfig,
|
loadGlobalConfig,
|
||||||
getEffectiveDebugConfig,
|
getEffectiveDebugConfig,
|
||||||
} from './config/index.js';
|
} from './config/index.js';
|
||||||
@ -53,6 +54,9 @@ program
|
|||||||
// Initialize global directories first
|
// Initialize global directories first
|
||||||
await initGlobalDirs();
|
await initGlobalDirs();
|
||||||
|
|
||||||
|
// Initialize project directories (.takt/)
|
||||||
|
initProjectDirs(cwd);
|
||||||
|
|
||||||
// Initialize debug logger from config
|
// Initialize debug logger from config
|
||||||
const debugConfig = getEffectiveDebugConfig(cwd);
|
const debugConfig = getEffectiveDebugConfig(cwd);
|
||||||
initDebugLogger(debugConfig, cwd);
|
initDebugLogger(debugConfig, cwd);
|
||||||
|
|||||||
@ -14,11 +14,13 @@ import {
|
|||||||
getGlobalAgentsDir,
|
getGlobalAgentsDir,
|
||||||
getGlobalWorkflowsDir,
|
getGlobalWorkflowsDir,
|
||||||
getGlobalLogsDir,
|
getGlobalLogsDir,
|
||||||
|
getProjectConfigDir,
|
||||||
ensureDir,
|
ensureDir,
|
||||||
} from './paths.js';
|
} from './paths.js';
|
||||||
import {
|
import {
|
||||||
copyGlobalResourcesToDir,
|
copyGlobalResourcesToDir,
|
||||||
copyLanguageResourcesToDir,
|
copyLanguageResourcesToDir,
|
||||||
|
copyProjectResourcesToDir,
|
||||||
} from '../resources/index.js';
|
} from '../resources/index.js';
|
||||||
import { setLanguage } from './globalConfig.js';
|
import { setLanguage } from './globalConfig.js';
|
||||||
|
|
||||||
@ -74,3 +76,14 @@ export async function initGlobalDirs(): Promise<void> {
|
|||||||
copyGlobalResourcesToDir(getGlobalConfigDir());
|
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