MCPcopy Create free account
hub / github.com/dyoshikawa/rulesync / createConfigFile

Function createConfigFile

src/lib/init.ts:44–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44async function createConfigFile(): Promise<InitFileResult> {
45 const path = RULESYNC_CONFIG_RELATIVE_FILE_PATH;
46
47 if (await fileExists(path)) {
48 return { created: false, path };
49 }
50
51 await writeFileContent(
52 path,
53 JSON.stringify(
54 {
55 $schema: RULESYNC_CONFIG_SCHEMA_URL,
56 targets: ["copilot", "cursor", "claudecode", "codexcli"],
57 features: ["rules", "ignore", "mcp", "commands", "subagents", "skills", "hooks"],
58 outputRoots: ["."],
59 delete: true,
60 verbose: false,
61 silent: false,
62 global: false,
63 simulateCommands: false,
64 simulateSubagents: false,
65 simulateSkills: false,
66 gitignoreTargetsOnly: true,
67 } satisfies ConfigFile,
68 null,
69 2,
70 ),
71 );
72
73 return { created: true, path };
74}
75
76async function createSampleFiles(): Promise<InitFileResult[]> {
77 const results: InitFileResult[] = [];

Callers 1

initFunction · 0.85

Calls 2

fileExistsFunction · 0.85
writeFileContentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…