{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4729","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4729/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4729/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/4729/events","html_url":"https://github.com/Microsoft/TypeScript/issues/4729","id":105887555,"number":4729,"title":"Proposal: --bundle option should allow for restricting output to parts of a project","user":{"login":"SetTrend","id":9283914,"avatar_url":"https://avatars.githubusercontent.com/u/9283914?v=3","gravatar_id":"","url":"https://api.github.com/users/SetTrend","html_url":"https://github.com/SetTrend","followers_url":"https://api.github.com/users/SetTrend/followers","following_url":"https://api.github.com/users/SetTrend/following{/other_user}","gists_url":"https://api.github.com/users/SetTrend/gists{/gist_id}","starred_url":"https://api.github.com/users/SetTrend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SetTrend/subscriptions","organizations_url":"https://api.github.com/users/SetTrend/orgs","repos_url":"https://api.github.com/users/SetTrend/repos","events_url":"https://api.github.com/users/SetTrend/events{/privacy}","received_events_url":"https://api.github.com/users/SetTrend/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Declined","name":"Declined","color":"556677"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Suggestion","name":"Suggestion","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-10T20:04:08Z","updated_at":"2015-09-11T20:35:02Z","closed_at":"2015-09-11T20:35:02Z","body":"Taking up issues #4225 and #4434 I like to propose that it should be possible to create *groups of bundles* within a project.\r\n\r\nA project commonly consists of files constituting the task to accomplish (i.e. the \"library\" to create), a number of test cases and other supporting files.\r\n\r\nConcatenating them all into a single file would not be the intention of the programmer.\r\n\r\nHence, I'd like to propose to add an optional parameter to the `--bundle` option allowing for selectively adding branches of the project to the generated file.\r\n\r\nThe suggested format is a JSON array, allowing for concatenating parts of a project into different JavaScript files.\r\n\r\n.\r\n\r\nHere's an example of such argument:\r\n\r\n``````javascript\r\n[ \"./TypeScript/*.ts\": \"./js/combined.js\"   // end glob either with wildcard or directory to search for input\r\n, \"./Lib/*.ts\": \"./js/Lib.js\"   // syntax is: \"source file list\": \"concatenated destination file\"\r\n, \"./Test/TypeScript\": \"./Test/js/main.js\"\r\n]\r\n``````\r\n\r\n... or a more vivid example:\r\n\r\n``````javascript\r\n[ \"./Angular/**/*.ts\": \"./out/angular.js\"\r\n, \"./Animation/**/*.ts\": \"./out/angular-animate.js\"\r\n, \"./Aria/**/*.ts\": \"./out/angular-aria.js\"\r\n, \"./Cookies/**/*.ts\": \"./out/angular-cookies.js\"\r\n, \"./Loader/**/*.ts\": \"./out/angular-loader.js\"\r\n, \"./Messages/**/*.ts\": \"./out/angular-messages.js\"\r\n, \"./Touch/**/*.ts\": \"./out/angular-touch.js\"\r\n, \"./~Test\": \"./out/Test/main.js\"\r\n]\r\n``````"}}