GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(@angular/cli): Updates .gitignore to keep out VSCode and Int… · console-cat/angular-cli@76b13e2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .gitignore
  • scripts
    • build.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.gitignore‎

Copy file name to clipboardExpand all lines: .gitignore
+19-1Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,27 @@ dist/
55
dist-schema/
66

77
# IDEs
8-
.idea/
98
jsconfig.json
9+
10+
# Intellij IDEA/WebStorm
11+
# https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
12+
.idea/**/workspace.xml
13+
.idea/**/tasks.xml
14+
.idea/**/usage.statistics.xml
15+
.idea/**/dictionaries
16+
.idea/**/shelf
17+
18+
# Also ignore code styles because .editorconfig is used instead.
19+
.idea/codeStyles/
20+
21+
# VSCode
22+
# https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore
1023
.vscode/
24+
!.vscode/settings.json
25+
!.vscode/tasks.json
26+
!.vscode/launch.json
27+
!.vscode/extensions.json
28+
**/*.code-workspace
1129

1230
# Typings file.
1331
typings/
Collapse file

‎scripts/build.ts‎

Copy file name to clipboardExpand all lines: scripts/build.ts
+12-4Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,23 @@ import buildSchema from './build-schema';
1717
const minimatch = require('minimatch');
1818
const tar = require('tar');
1919

20-
const gitIgnore = fs.readFileSync(path.join(__dirname, '../.gitignore'), 'utf-8')
21-
.split('\n')
20+
const gitIgnoreFiles = fs.readFileSync(path.join(__dirname, '../.gitignore'), 'utf-8')
21+
.split('\n');
22+
const gitIgnore = gitIgnoreFiles
2223
.map(line => line.replace(/#.*/, ''))
24+
.filter((line) => !line.startsWith('!'))
2325
.filter(line => !line.match(/^\s*$/));
26+
const gitIgnoreExcept = gitIgnoreFiles
27+
.filter((line) => line.startsWith('!'))
28+
.map((line) => line.substr(1));
2429

25-
26-
function _gitIgnoreMatch(p: string) {
30+
function _gitIgnoreMatch(p: string): boolean {
2731
p = path.relative(path.dirname(__dirname), p);
2832

33+
if (gitIgnoreExcept.some((line) => minimatch(p, line))) {
34+
return false;
35+
}
36+
2937
return gitIgnore.some(line => minimatch(p, line));
3038
}
3139

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.