MCPcopy Index your code
hub / github.com/subquery/subql / prepareGitIgnore

Function prepareGitIgnore

packages/cli/src/controller/init-controller.ts:331–342  ·  view source on GitHub ↗
(projectPath: string)

Source from the content-addressed store, hash-verified

329}
330
331export async function prepareGitIgnore(projectPath: string): Promise<void> {
332 //load and write .gitignore
333 const gitIgnorePath = defaultGitIgnorePath(projectPath);
334 const isGitIgnore = fs.existsSync(gitIgnorePath);
335
336 if (isGitIgnore) {
337 let gitIgnoreManifest = (await fs.promises.readFile(gitIgnorePath, 'utf8')).toString();
338 //add local .env files in .gitignore
339 gitIgnoreManifest += `\n# ENV local files\n.env.local\n.env.develop.local`;
340 await fs.promises.writeFile(gitIgnorePath, gitIgnoreManifest, 'utf8');
341 }
342}
343
344export function installDependencies(
345 projectPath: string,

Callers 1

prepareFunction · 0.85

Calls 1

defaultGitIgnorePathFunction · 0.90

Tested by

no test coverage detected