File tree Expand file tree Collapse file tree 2 files changed +31
-5
lines changed
Expand file tree Collapse file tree 2 files changed +31
-5
lines changed Original file line number Diff line number Diff line change 55dist-schema /
66
77# IDEs
8- .idea /
98jsconfig.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.
1331typings /
Original file line number Diff line number Diff line change @@ -17,15 +17,23 @@ import buildSchema from './build-schema';
1717const minimatch = require ( 'minimatch' ) ;
1818const 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
You can’t perform that action at this time.
0 commit comments