2016-05-12 59 views
11

我正在嘗試學習Angular 2,並且正在設置一個示例項目。我只想知道我的.gitignore已經夠用了,還是我錯過了什麼?Angular2 .gitignore

node_modules 
typings 
jspm_packages 
bower_components 
app/**/*.js 
app/**/*.map 

TIA!

回答

22

angular-cli產生

# See http://help.github.com/ignore-files/ for more about ignoring files. 

# compiled output 
/dist 
/tmp 
/out-tsc 

# dependencies 
/node_modules 

# IDEs and editors 
/.idea 
.project 
.classpath 
.c9/ 
*.launch 
.settings/ 
*.sublime-workspace 

# IDE - VSCode 
.vscode/* 
!.vscode/settings.json 
!.vscode/tasks.json 
!.vscode/launch.json 
!.vscode/extensions.json 

# misc 
/.sass-cache 
/connect.lock 
/coverage 
/libpeerconnection.log 
npm-debug.log 
testem.log 
/typings 

# e2e 
/e2e/*.js 
/e2e/*.map 

# System Files 
.DS_Store 
Thumbs.db 
+1

一個'NG新MyProject'犯規包括任何'.gitignore'文件...? – Blauhirn

+0

我不知道爲什麼。我確定它應該。這是它應該生成的文件https://github.com/angular/angular-cli/blob/e9372d3c11af622f026d391088e173eb5c66bda9/packages/%40angular/cli/blueprints/ng/files/gitignore –

+1

謝謝!發現了這個問題。由於http://stackoverflow.com/a/43525586/3779853,ng cli沒有正確更新。 – Blauhirn