{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1927","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1927/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1927/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1927/events","html_url":"https://github.com/Microsoft/TypeScript/issues/1927","id":56563651,"number":1927,"title":"support globs in tsconfig.json files property (or just file/directory exclusions)","user":{"login":"JeroMiya","id":320332,"avatar_url":"https://avatars.githubusercontent.com/u/320332?v=3","gravatar_id":"","url":"https://api.github.com/users/JeroMiya","html_url":"https://github.com/JeroMiya","followers_url":"https://api.github.com/users/JeroMiya/followers","following_url":"https://api.github.com/users/JeroMiya/following{/other_user}","gists_url":"https://api.github.com/users/JeroMiya/gists{/gist_id}","starred_url":"https://api.github.com/users/JeroMiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeroMiya/subscriptions","organizations_url":"https://api.github.com/users/JeroMiya/orgs","repos_url":"https://api.github.com/users/JeroMiya/repos","events_url":"https://api.github.com/users/JeroMiya/events{/privacy}","received_events_url":"https://api.github.com/users/JeroMiya/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Suggestion","name":"Suggestion","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":60,"created_at":"2015-02-04T18:00:19Z","updated_at":"2015-11-26T17:50:00Z","closed_at":null,"body":"An extension to https://github.com/Microsoft/TypeScript/pull/1692\r\n\r\nOur ts project uses a grunt-based build system, with bower dependencies for the application and node_modules for build-tools. We will need the ability to exclude node_modules and bower_components from the build by default (unless files are referenced via /// <reference path=\"...\" />).\r\n\r\nThis causes an issue: we have end-to-end tests running in protractor, as well as unit tests running in jasmine, and unless we have the ability to exclude node_modules and bower_components, both will be parsed and we'll get duplicate definition errors.\r\n\r\nIn Visual Studio today, this is why we need to exclude both bower_components and node_modules from the project, because visual studio automatically parses all files in the project with no way to exclude them except to keep them out of the project altogether.\r\n\r\nA number of third party tools have started to support tsconfig.json, and one thing I've noticed is that most of them support some sort of extension to tsconfig.json that supports file globs. I propose we just add support into the spec for file globs. For the version of typescript on npm, we can just depend on the appropriate file glob libraries in the npm ecosystem. For the Visual Studio embedded version of TypeScript, just embed the glob libraries that are needed statically in the installation.\r\n\r\nAs a fallback, if the notion of including a third party glob library is a non-starter, then the following fallback supporting a subset of the glob patterns would solve our problem at least partially.\r\n\r\nFallback:\r\nSupport both file and directory inclusions and exclusions in the files property:\r\n```\r\nfiles: [\r\n  'app/', (equivalent to 'app/**/*.ts')\r\n  '!e2e/', (equivalent to '!e2e/**/*.ts')\r\n  '!node_modules/',\r\n  '!app/bower_components/',\r\n  '!app/vendor/fooLib/fooLib.ts'\r\n]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/159968805","html_url":"https://github.com/Microsoft/TypeScript/issues/1927#issuecomment-159968805","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1927","id":159968805,"user":{"login":"falsandtru","id":3143368,"avatar_url":"https://avatars.githubusercontent.com/u/3143368?v=3","gravatar_id":"","url":"https://api.github.com/users/falsandtru","html_url":"https://github.com/falsandtru","followers_url":"https://api.github.com/users/falsandtru/followers","following_url":"https://api.github.com/users/falsandtru/following{/other_user}","gists_url":"https://api.github.com/users/falsandtru/gists{/gist_id}","starred_url":"https://api.github.com/users/falsandtru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/falsandtru/subscriptions","organizations_url":"https://api.github.com/users/falsandtru/orgs","repos_url":"https://api.github.com/users/falsandtru/repos","events_url":"https://api.github.com/users/falsandtru/events{/privacy}","received_events_url":"https://api.github.com/users/falsandtru/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T17:50:00Z","updated_at":"2015-11-26T17:50:00Z","body":"+1 I already use globs with tsc."}}