{"action":"opened","number":227,"pull_request":{"url":"https://api.github.com/repos/flyjs/fly/pulls/227","id":91666257,"html_url":"https://github.com/flyjs/fly/pull/227","diff_url":"https://github.com/flyjs/fly/pull/227.diff","patch_url":"https://github.com/flyjs/fly/pull/227.patch","issue_url":"https://api.github.com/repos/flyjs/fly/issues/227","number":227,"state":"open","locked":false,"title":"[Edge Case]: Allow parsing of alt `package.json` file","user":{"login":"lukeed","id":5855893,"avatar_url":"https://avatars.githubusercontent.com/u/5855893?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeed","html_url":"https://github.com/lukeed","followers_url":"https://api.github.com/users/lukeed/followers","following_url":"https://api.github.com/users/lukeed/following{/other_user}","gists_url":"https://api.github.com/users/lukeed/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeed/subscriptions","organizations_url":"https://api.github.com/users/lukeed/orgs","repos_url":"https://api.github.com/users/lukeed/repos","events_url":"https://api.github.com/users/lukeed/events{/privacy}","received_events_url":"https://api.github.com/users/lukeed/received_events","type":"User","site_admin":false},"body":"Currently, Fly is **assuming** that a project's main `package.json` file is located somewhere between the `flyfile.js` and the project's root directory.\r\n\r\nIn rare situations, the `package.json` file that we found may not be the one that User wants us to use.\r\n\r\nFor example:\r\n\r\n```\r\n\\project\r\n  |- package.json\r\n  |- flyfile.js\r\n  |- \\server\r\n      |- package.json\r\n  |- \\client\r\n      |- package.json\r\n```\r\n\r\nIn this contrived**<sup>(•)</sup>** example, we will stop at `project/package.json` when, in fact, the copy at `project/client/package.json` has all the fly-related plugins declared. In this situation, all tasks will fail with `\"this.source(...).xo\" is not a function`.\r\n\r\n> **<sup>(•)</sup>** Yes, `flyfile.js` could be moved to `client/flyfile.js`)\r\n\r\nTo fix this, User can now place a `\"fly\"` key in their root `package.json` (the one Fly finds):\r\n\r\n```json\r\n// project/package.json\r\n\r\n{\r\n  \"name\": \"root-package\",\r\n  \"fly\": {\r\n    \"pkg\": \"./client\"\r\n  }\r\n}\r\n```\r\n\r\nNow, Fly will recursively read `package.json` files. If a file has this key block declared, Fly will resolve (`path.resolve`) the specified directory **from** the current file's directory. \r\n\r\n> This also means that one can point to a directory outside of `project`.\r\n\r\nHowever, if the new directory does not contain a `package.json` file, Fly will notify User that nothing was found & exit.","created_at":"2016-10-31T18:43:09Z","updated_at":"2016-10-31T18:43:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/flyjs/fly/milestones/9","html_url":"https://github.com/flyjs/fly/milestones/2.0.0","labels_url":"https://api.github.com/repos/flyjs/fly/milestones/9/labels","id":2033463,"number":9,"title":"2.0.0","description":null,"creator":{"login":"lukeed","id":5855893,"avatar_url":"https://avatars.githubusercontent.com/u/5855893?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeed","html_url":"https://github.com/lukeed","followers_url":"https://api.github.com/users/lukeed/followers","following_url":"https://api.github.com/users/lukeed/following{/other_user}","gists_url":"https://api.github.com/users/lukeed/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeed/subscriptions","organizations_url":"https://api.github.com/users/lukeed/orgs","repos_url":"https://api.github.com/users/lukeed/repos","events_url":"https://api.github.com/users/lukeed/events{/privacy}","received_events_url":"https://api.github.com/users/lukeed/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":14,"state":"open","created_at":"2016-09-27T23:50:07Z","updated_at":"2016-10-31T18:43:09Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/flyjs/fly/pulls/227/commits","review_comments_url":"https://api.github.com/repos/flyjs/fly/pulls/227/comments","review_comment_url":"https://api.github.com/repos/flyjs/fly/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flyjs/fly/issues/227/comments","statuses_url":"https://api.github.com/repos/flyjs/fly/statuses/92d4fd5a0af730dfc2772e2cd5800cb30f4f87b2","head":{"label":"flyjs:package-dir","ref":"package-dir","sha":"92d4fd5a0af730dfc2772e2cd5800cb30f4f87b2","user":{"login":"flyjs","id":20690665,"avatar_url":"https://avatars.githubusercontent.com/u/20690665?v=3","gravatar_id":"","url":"https://api.github.com/users/flyjs","html_url":"https://github.com/flyjs","followers_url":"https://api.github.com/users/flyjs/followers","following_url":"https://api.github.com/users/flyjs/following{/other_user}","gists_url":"https://api.github.com/users/flyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/flyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flyjs/subscriptions","organizations_url":"https://api.github.com/users/flyjs/orgs","repos_url":"https://api.github.com/users/flyjs/repos","events_url":"https://api.github.com/users/flyjs/events{/privacy}","received_events_url":"https://api.github.com/users/flyjs/received_events","type":"Organization","site_admin":false},"repo":{"id":38307496,"name":"fly","full_name":"flyjs/fly","owner":{"login":"flyjs","id":20690665,"avatar_url":"https://avatars.githubusercontent.com/u/20690665?v=3","gravatar_id":"","url":"https://api.github.com/users/flyjs","html_url":"https://github.com/flyjs","followers_url":"https://api.github.com/users/flyjs/followers","following_url":"https://api.github.com/users/flyjs/following{/other_user}","gists_url":"https://api.github.com/users/flyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/flyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flyjs/subscriptions","organizations_url":"https://api.github.com/users/flyjs/orgs","repos_url":"https://api.github.com/users/flyjs/repos","events_url":"https://api.github.com/users/flyjs/events{/privacy}","received_events_url":"https://api.github.com/users/flyjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flyjs/fly","description":"Node.js build system based in generators","fork":false,"url":"https://api.github.com/repos/flyjs/fly","forks_url":"https://api.github.com/repos/flyjs/fly/forks","keys_url":"https://api.github.com/repos/flyjs/fly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flyjs/fly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flyjs/fly/teams","hooks_url":"https://api.github.com/repos/flyjs/fly/hooks","issue_events_url":"https://api.github.com/repos/flyjs/fly/issues/events{/number}","events_url":"https://api.github.com/repos/flyjs/fly/events","assignees_url":"https://api.github.com/repos/flyjs/fly/assignees{/user}","branches_url":"https://api.github.com/repos/flyjs/fly/branches{/branch}","tags_url":"https://api.github.com/repos/flyjs/fly/tags","blobs_url":"https://api.github.com/repos/flyjs/fly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flyjs/fly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flyjs/fly/git/refs{/sha}","trees_url":"https://api.github.com/repos/flyjs/fly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flyjs/fly/statuses/{sha}","languages_url":"https://api.github.com/repos/flyjs/fly/languages","stargazers_url":"https://api.github.com/repos/flyjs/fly/stargazers","contributors_url":"https://api.github.com/repos/flyjs/fly/contributors","subscribers_url":"https://api.github.com/repos/flyjs/fly/subscribers","subscription_url":"https://api.github.com/repos/flyjs/fly/subscription","commits_url":"https://api.github.com/repos/flyjs/fly/commits{/sha}","git_commits_url":"https://api.github.com/repos/flyjs/fly/git/commits{/sha}","comments_url":"https://api.github.com/repos/flyjs/fly/comments{/number}","issue_comment_url":"https://api.github.com/repos/flyjs/fly/issues/comments{/number}","contents_url":"https://api.github.com/repos/flyjs/fly/contents/{+path}","compare_url":"https://api.github.com/repos/flyjs/fly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flyjs/fly/merges","archive_url":"https://api.github.com/repos/flyjs/fly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flyjs/fly/downloads","issues_url":"https://api.github.com/repos/flyjs/fly/issues{/number}","pulls_url":"https://api.github.com/repos/flyjs/fly/pulls{/number}","milestones_url":"https://api.github.com/repos/flyjs/fly/milestones{/number}","notifications_url":"https://api.github.com/repos/flyjs/fly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flyjs/fly/labels{/name}","releases_url":"https://api.github.com/repos/flyjs/fly/releases{/id}","deployments_url":"https://api.github.com/repos/flyjs/fly/deployments","created_at":"2015-06-30T12:19:00Z","updated_at":"2016-10-31T15:00:52Z","pushed_at":"2016-10-31T18:43:09Z","git_url":"git://github.com/flyjs/fly.git","ssh_url":"git@github.com:flyjs/fly.git","clone_url":"https://github.com/flyjs/fly.git","svn_url":"https://github.com/flyjs/fly","homepage":"","size":718,"stargazers_count":1643,"watchers_count":1643,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"open_issues_count":12,"forks":58,"open_issues":12,"watchers":1643,"default_branch":"master"}},"base":{"label":"flyjs:master","ref":"master","sha":"2e1d3b77ca630fce88ac4c05e8b946f9cea3b503","user":{"login":"flyjs","id":20690665,"avatar_url":"https://avatars.githubusercontent.com/u/20690665?v=3","gravatar_id":"","url":"https://api.github.com/users/flyjs","html_url":"https://github.com/flyjs","followers_url":"https://api.github.com/users/flyjs/followers","following_url":"https://api.github.com/users/flyjs/following{/other_user}","gists_url":"https://api.github.com/users/flyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/flyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flyjs/subscriptions","organizations_url":"https://api.github.com/users/flyjs/orgs","repos_url":"https://api.github.com/users/flyjs/repos","events_url":"https://api.github.com/users/flyjs/events{/privacy}","received_events_url":"https://api.github.com/users/flyjs/received_events","type":"Organization","site_admin":false},"repo":{"id":38307496,"name":"fly","full_name":"flyjs/fly","owner":{"login":"flyjs","id":20690665,"avatar_url":"https://avatars.githubusercontent.com/u/20690665?v=3","gravatar_id":"","url":"https://api.github.com/users/flyjs","html_url":"https://github.com/flyjs","followers_url":"https://api.github.com/users/flyjs/followers","following_url":"https://api.github.com/users/flyjs/following{/other_user}","gists_url":"https://api.github.com/users/flyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/flyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flyjs/subscriptions","organizations_url":"https://api.github.com/users/flyjs/orgs","repos_url":"https://api.github.com/users/flyjs/repos","events_url":"https://api.github.com/users/flyjs/events{/privacy}","received_events_url":"https://api.github.com/users/flyjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flyjs/fly","description":"Node.js build system based in generators","fork":false,"url":"https://api.github.com/repos/flyjs/fly","forks_url":"https://api.github.com/repos/flyjs/fly/forks","keys_url":"https://api.github.com/repos/flyjs/fly/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flyjs/fly/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flyjs/fly/teams","hooks_url":"https://api.github.com/repos/flyjs/fly/hooks","issue_events_url":"https://api.github.com/repos/flyjs/fly/issues/events{/number}","events_url":"https://api.github.com/repos/flyjs/fly/events","assignees_url":"https://api.github.com/repos/flyjs/fly/assignees{/user}","branches_url":"https://api.github.com/repos/flyjs/fly/branches{/branch}","tags_url":"https://api.github.com/repos/flyjs/fly/tags","blobs_url":"https://api.github.com/repos/flyjs/fly/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flyjs/fly/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flyjs/fly/git/refs{/sha}","trees_url":"https://api.github.com/repos/flyjs/fly/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flyjs/fly/statuses/{sha}","languages_url":"https://api.github.com/repos/flyjs/fly/languages","stargazers_url":"https://api.github.com/repos/flyjs/fly/stargazers","contributors_url":"https://api.github.com/repos/flyjs/fly/contributors","subscribers_url":"https://api.github.com/repos/flyjs/fly/subscribers","subscription_url":"https://api.github.com/repos/flyjs/fly/subscription","commits_url":"https://api.github.com/repos/flyjs/fly/commits{/sha}","git_commits_url":"https://api.github.com/repos/flyjs/fly/git/commits{/sha}","comments_url":"https://api.github.com/repos/flyjs/fly/comments{/number}","issue_comment_url":"https://api.github.com/repos/flyjs/fly/issues/comments{/number}","contents_url":"https://api.github.com/repos/flyjs/fly/contents/{+path}","compare_url":"https://api.github.com/repos/flyjs/fly/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flyjs/fly/merges","archive_url":"https://api.github.com/repos/flyjs/fly/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flyjs/fly/downloads","issues_url":"https://api.github.com/repos/flyjs/fly/issues{/number}","pulls_url":"https://api.github.com/repos/flyjs/fly/pulls{/number}","milestones_url":"https://api.github.com/repos/flyjs/fly/milestones{/number}","notifications_url":"https://api.github.com/repos/flyjs/fly/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flyjs/fly/labels{/name}","releases_url":"https://api.github.com/repos/flyjs/fly/releases{/id}","deployments_url":"https://api.github.com/repos/flyjs/fly/deployments","created_at":"2015-06-30T12:19:00Z","updated_at":"2016-10-31T15:00:52Z","pushed_at":"2016-10-31T18:43:09Z","git_url":"git://github.com/flyjs/fly.git","ssh_url":"git@github.com:flyjs/fly.git","clone_url":"https://github.com/flyjs/fly.git","svn_url":"https://github.com/flyjs/fly","homepage":"","size":718,"stargazers_count":1643,"watchers_count":1643,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":58,"mirror_url":null,"open_issues_count":12,"forks":58,"open_issues":12,"watchers":1643,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flyjs/fly/pulls/227"},"html":{"href":"https://github.com/flyjs/fly/pull/227"},"issue":{"href":"https://api.github.com/repos/flyjs/fly/issues/227"},"comments":{"href":"https://api.github.com/repos/flyjs/fly/issues/227/comments"},"review_comments":{"href":"https://api.github.com/repos/flyjs/fly/pulls/227/comments"},"review_comment":{"href":"https://api.github.com/repos/flyjs/fly/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flyjs/fly/pulls/227/commits"},"statuses":{"href":"https://api.github.com/repos/flyjs/fly/statuses/92d4fd5a0af730dfc2772e2cd5800cb30f4f87b2"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":5,"additions":80,"deletions":20,"changed_files":3}}
{"actor":{"display_login":"lukeed"}}