{"action":"opened","issue":{"url":"https://api.github.com/repos/lerna/lerna/issues/1689","repository_url":"https://api.github.com/repos/lerna/lerna","labels_url":"https://api.github.com/repos/lerna/lerna/issues/1689/labels{/name}","comments_url":"https://api.github.com/repos/lerna/lerna/issues/1689/comments","events_url":"https://api.github.com/repos/lerna/lerna/issues/1689/events","html_url":"https://github.com/lerna/lerna/issues/1689","id":361672407,"node_id":"MDU6SXNzdWUzNjE2NzI0MDc=","number":1689,"title":"Sequential sorted running of certain commands","user":{"login":"kirill-konshin","id":1530410,"node_id":"MDQ6VXNlcjE1MzA0MTA=","avatar_url":"https://avatars0.githubusercontent.com/u/1530410?v=4","gravatar_id":"","url":"https://api.github.com/users/kirill-konshin","html_url":"https://github.com/kirill-konshin","followers_url":"https://api.github.com/users/kirill-konshin/followers","following_url":"https://api.github.com/users/kirill-konshin/following{/other_user}","gists_url":"https://api.github.com/users/kirill-konshin/gists{/gist_id}","starred_url":"https://api.github.com/users/kirill-konshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirill-konshin/subscriptions","organizations_url":"https://api.github.com/users/kirill-konshin/orgs","repos_url":"https://api.github.com/users/kirill-konshin/repos","events_url":"https://api.github.com/users/kirill-konshin/events{/privacy}","received_events_url":"https://api.github.com/users/kirill-konshin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-19T10:04:28Z","updated_at":"2018-09-19T10:04:28Z","closed_at":null,"author_association":"NONE","body":"When building complex projects often times it has some libs along with actual apps, for example two or more React apps along with a bunch of shared libs. Those libs can depend on each other.\r\n\r\nDuring the initial bootstrap we currently have to build libs one by one in a certain sequential order to make sure libs that depend on other libs will be built after them (especially on TS projects where compiler will look for `.d.ts` files and so on).\r\n\r\nLater on watch phase order is not so critical because changes propagate through packages like a ripple, but this first initial kick has to be ordered.\r\n\r\n## Expected Behavior\r\n\r\nIt would be great if Lerna will provide some way to tell the order in which command has to be executed in packages.\r\n\r\n## Possible Solution\r\n\r\nSomething like this can work:\r\n\r\n```json\r\n{\r\n  \"lerna\": \"3.2.1\",\r\n  \"packages\": [\r\n    \"libs/*\",\r\n    \"apps/*\"\r\n  ],\r\n  \"command\": {\r\n    \"bootstrap\": {\r\n      \"sequence\": [\r\n        \"scope-1\",\r\n        \"scope-2\"\r\n      ]\r\n    }\r\n  },\r\n  \"version\": \"independent\"\r\n}\r\n```\r\n\r\nOr through CLI:\r\n\r\n```bash\r\nnpx lerna bootstrap --hoist --sequence=scope-1,scope-2\r\n```"}}
{"actor":{"display_login":"kirill-konshin"}}