{"action":"created","issue":{"url":"https://api.github.com/repos/craftson/spec/issues/13","labels_url":"https://api.github.com/repos/craftson/spec/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/craftson/spec/issues/13/comments","events_url":"https://api.github.com/repos/craftson/spec/issues/13/events","html_url":"https://github.com/craftson/spec/issues/13","id":114727839,"number":13,"title":"Specifying multiple packages","user":{"login":"gratimax","id":1261779,"avatar_url":"https://avatars.githubusercontent.com/u/1261779?v=3","gravatar_id":"","url":"https://api.github.com/users/gratimax","html_url":"https://github.com/gratimax","followers_url":"https://api.github.com/users/gratimax/followers","following_url":"https://api.github.com/users/gratimax/following{/other_user}","gists_url":"https://api.github.com/users/gratimax/gists{/gist_id}","starred_url":"https://api.github.com/users/gratimax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gratimax/subscriptions","organizations_url":"https://api.github.com/users/gratimax/orgs","repos_url":"https://api.github.com/users/gratimax/repos","events_url":"https://api.github.com/users/gratimax/events{/privacy}","received_events_url":"https://api.github.com/users/gratimax/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/craftson/spec/labels/input%20wanted","name":"input wanted","color":"fbca04"},{"url":"https://api.github.com/repos/craftson/spec/labels/question","name":"question","color":"035E15"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-03T02:15:31Z","updated_at":"2015-11-03T12:57:55Z","closed_at":null,"body":"There's a use for specifying multiple packages within one artifact. There's two ways to do this. First is to allow an array at the root of craft.json:\r\n\r\n```js\r\n[\r\n  { /* package */ },\r\n  { /* package */ },\r\n  // ...\r\n]\r\n```\r\n\r\nAnother option is to specify multiple packages as a key in the root package object:\r\n\r\n```js\r\n{\r\n  \"subpackages\": {\r\n    \"path/1\": { /* package */ },\r\n    \"path/2\": { /* package */ },\r\n    // ...\r\n   }\r\n}\r\n```\r\nI'm sort of leaning to the second option because it means that we don't have to complicate the spec with two kinds of roots in craft.json. The question is if it's useful to just have a collection of 'subpackages', i.e. that specifying the root package is required."},"comment":{"url":"https://api.github.com/repos/craftson/spec/issues/comments/153343801","html_url":"https://github.com/craftson/spec/issues/13#issuecomment-153343801","issue_url":"https://api.github.com/repos/craftson/spec/issues/13","id":153343801,"user":{"login":"kashike","id":5474071,"avatar_url":"https://avatars.githubusercontent.com/u/5474071?v=3","gravatar_id":"","url":"https://api.github.com/users/kashike","html_url":"https://github.com/kashike","followers_url":"https://api.github.com/users/kashike/followers","following_url":"https://api.github.com/users/kashike/following{/other_user}","gists_url":"https://api.github.com/users/kashike/gists{/gist_id}","starred_url":"https://api.github.com/users/kashike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kashike/subscriptions","organizations_url":"https://api.github.com/users/kashike/orgs","repos_url":"https://api.github.com/users/kashike/repos","events_url":"https://api.github.com/users/kashike/events{/privacy}","received_events_url":"https://api.github.com/users/kashike/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T12:57:55Z","updated_at":"2015-11-03T12:57:55Z","body":"I'd go for this, always requiring an array:\r\n```json\r\n\r\n[\r\n    {\r\n        \"group\": \"org.spongepowered\",\r\n        \"id\": \"spongeforge\",\r\n        \"name\": \"SpongeForge\"\r\n    },\r\n    {\r\n        \"group\": \"org.spongepowered\",\r\n        \"id\": \"spongevanilla\",\r\n        \"name\": \"SpongeVanilla\"\r\n    }\r\n]\r\n```"}}