8 examples of 'angular gitignore' in JavaScript

Every line of 'angular gitignore' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
22export function createGitIgnore(projectName) {
23 log.verbose('creating .gitignore file', { projectName });
24
25 writeFile(
26 `${projectName}/${constants.github.gitIgnore.fileName}`,
27 loadTemplate('./../../templates/git/gitignore')
28 );
29}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

4writing() {
5 this.fs.copyTpl(
6 this.templatePath('gitignore'),
7 this.destinationPath('.gitignore'),
8 )
9}
13async function updateGitIgnore(dir) {
14 // add our ember build directories to .gitignore
15 let gitIgnorePath = path.join(dir, '.gitignore');
16 let contents = await readFile(gitIgnorePath);
17 await writeFile(gitIgnorePath, [
18 contents.toString(),
19 '# Ember build',
20 `${emberBuildDir}/`,
21 `${emberTestBuildDir}/`,
22 ''
23 ].join('\n'));
24}
15addToGitIgnore(line) {
16 const file = './.gitignore'
17
18 let gitignore = read(file)
19 if (gitignore.includes(line)) return
20 gitignore += '\n' + line
21
22 write(file, gitignore)
23}
465createGitIgnore(outDir, entries) {
466 this.log(`Creating '.gitignore' ...`);
467
468 fs.writeFileSync(
469 String(outDir) + '/.gitignore',
470 entries.join("\n"),
471 'utf8'
472 );
473}
38function createGitIgnoreFile(dirPath) {
39 fs.copySync(
40 `${templatesPath}/starterFileGitignore.txt`,
41 `${dirPath}/.gitignore`
42 );
43}
48function extractFiles2Ignore(path = "./.openodeignore") {
49 return files2Ignore(path, [
50 ".openode",
51 ".openodeignore",
52 "node_modules",
53 ".git",
54 "openode_scripts"
55 ]);
56}
122function getBuildIgnore () {
123 return fs
124 .readFileSync('.buildignore', 'utf8')
125 .split(/\r\n|\n|\r/)
126 .filter(item => {
127 if (item && item.indexOf('//') !== 0) {
128 return '!' + item
129 }
130 })
131 .map(item => '!' + item)
132}

Related snippets