GitHub PullRequestReviewCommentEvent at 2014-08-08 22:17:39
Repository: generator-cpui
Actor: 8bitDesigner
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/comments/16019535","id":16019535,"diff_hunk":"@@ -1,28 +1,45 @@\n var Base = require('../lib/cpui-base.js')\n+    , _ = require('underscore')\n+    , done = undefined\n+    , yo = undefined\n \n module.exports = Base.extend({\n   init: function() {\n-    var done = this.async()\n-      , self = this\n+    yo = this\n+    done = this.async()\n+    yo.buildSomething()\n+  },\n \n-    this.say(\"Let's build something cool\")\n+  buildSomething: function () {\n \n-    this.prompt([{\n-      type: 'list',\n-      name: 'generator',\n-      message: \"What do you want to build today?\",\n-      choices: [\n-        { value: 'cpui:scaffold',   name: 'A new app' },\n-        { value: 'cpui:model',      name: 'A new model' },\n-        { value: 'cpui:collection', name: 'A new collection' },\n-        { value: 'cpui:directive',  name: 'A new directive' },\n-        { value: 'cpui:controller', name: 'A new controller' },\n-        { value: 'cpui:route',      name: 'A new route' }\n-      ]\n-    }], function (props) {\n-      self.invoke(props.generator, {options: {mute: true}})\n-      done()\n-    })\n-  }\n-})\n+    var noConfig = _.isEmpty(yo.config.getAll())\n+    if (noConfig) {\n+      var message = \"Let's not get ahead of ourselves. Let's make you a \" +\n+          \"config first.\"\n+      yo.say(message)\n+      yo.invoke('cpui:bootstrap', {options: {mute: true}})","path":"app/index.js","position":41,"original_position":41,"commit_id":"043271ea8e758464dced5d4582af3301a256fa4e","original_commit_id":"043271ea8e758464dced5d4582af3301a256fa4e","user":{"login":"8bitDesigner","id":139790,"avatar_url":"https://avatars.githubusercontent.com/u/139790?v=2","gravatar_id":"e22310aa39101a767542fd659830caef","url":"https://api.github.com/users/8bitDesigner","html_url":"https://github.com/8bitDesigner","followers_url":"https://api.github.com/users/8bitDesigner/followers","following_url":"https://api.github.com/users/8bitDesigner/following{/other_user}","gists_url":"https://api.github.com/users/8bitDesigner/gists{/gist_id}","starred_url":"https://api.github.com/users/8bitDesigner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/8bitDesigner/subscriptions","organizations_url":"https://api.github.com/users/8bitDesigner/orgs","repos_url":"https://api.github.com/users/8bitDesigner/repos","events_url":"https://api.github.com/users/8bitDesigner/events{/privacy}","received_events_url":"https://api.github.com/users/8bitDesigner/received_events","type":"User","site_admin":false},"body":"Ideally this would be run if you kick off _any_ generator and there's no config file. eg: I run `yo cpui:directive` without a config; it should still bootstrap the generator and _then_ build me a directive","created_at":"2014-08-08T22:17:39Z","updated_at":"2014-08-08T22:17:39Z","html_url":"https://github.com/Fullscreen/generator-cpui/pull/5#discussion_r16019535","pull_request_url":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/comments/16019535"},"html":{"href":"https://github.com/Fullscreen/generator-cpui/pull/5#discussion_r16019535"},"pull_request":{"href":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/5","id":19379510,"html_url":"https://github.com/Fullscreen/generator-cpui/pull/5","diff_url":"https://github.com/Fullscreen/generator-cpui/pull/5.diff","patch_url":"https://github.com/Fullscreen/generator-cpui/pull/5.patch","issue_url":"https://api.github.com/repos/Fullscreen/generator-cpui/issues/5","number":5,"state":"open","title":"Uses config API instead of bower.json","user":{"login":"brandonaaskov","id":445778,"avatar_url":"https://avatars.githubusercontent.com/u/445778?v=2","gravatar_id":"43c12eee99ef76faffe45d87e5118f62","url":"https://api.github.com/users/brandonaaskov","html_url":"https://github.com/brandonaaskov","followers_url":"https://api.github.com/users/brandonaaskov/followers","following_url":"https://api.github.com/users/brandonaaskov/following{/other_user}","gists_url":"https://api.github.com/users/brandonaaskov/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonaaskov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonaaskov/subscriptions","organizations_url":"https://api.github.com/users/brandonaaskov/orgs","repos_url":"https://api.github.com/users/brandonaaskov/repos","events_url":"https://api.github.com/users/brandonaaskov/events{/privacy}","received_events_url":"https://api.github.com/users/brandonaaskov/received_events","type":"User","site_admin":false},"body":"This swaps out all the references to `this.cpui.paths` to use `this.generator.get('path')`. We're also setting up a default config so that if any of the keys (or the entire `.yo-rc.json` file is missing), the defaults will get injected instead. \r\n\r\n- [x] If I create anything with an already existing module, it exits as soon as I've named the module. I haven't figured out the cause of this one yet.","created_at":"2014-08-06T00:52:12Z","updated_at":"2014-08-08T22:17:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d26002c0fec44637d13a915f107a618a19a83785","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/5/commits","review_comments_url":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/5/comments","review_comment_url":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Fullscreen/generator-cpui/issues/5/comments","statuses_url":"https://api.github.com/repos/Fullscreen/generator-cpui/statuses/043271ea8e758464dced5d4582af3301a256fa4e","head":{"label":"Fullscreen:feature/config","ref":"feature/config","sha":"043271ea8e758464dced5d4582af3301a256fa4e","user":{"login":"Fullscreen","id":682200,"avatar_url":"https://avatars.githubusercontent.com/u/682200?v=2","gravatar_id":"224f077ce541f028790ce6e46fc5871c","url":"https://api.github.com/users/Fullscreen","html_url":"https://github.com/Fullscreen","followers_url":"https://api.github.com/users/Fullscreen/followers","following_url":"https://api.github.com/users/Fullscreen/following{/other_user}","gists_url":"https://api.github.com/users/Fullscreen/gists{/gist_id}","starred_url":"https://api.github.com/users/Fullscreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fullscreen/subscriptions","organizations_url":"https://api.github.com/users/Fullscreen/orgs","repos_url":"https://api.github.com/users/Fullscreen/repos","events_url":"https://api.github.com/users/Fullscreen/events{/privacy}","received_events_url":"https://api.github.com/users/Fullscreen/received_events","type":"Organization","site_admin":false},"repo":{"id":20820520,"name":"generator-cpui","full_name":"Fullscreen/generator-cpui","owner":{"login":"Fullscreen","id":682200,"avatar_url":"https://avatars.githubusercontent.com/u/682200?v=2","gravatar_id":"224f077ce541f028790ce6e46fc5871c","url":"https://api.github.com/users/Fullscreen","html_url":"https://github.com/Fullscreen","followers_url":"https://api.github.com/users/Fullscreen/followers","following_url":"https://api.github.com/users/Fullscreen/following{/other_user}","gists_url":"https://api.github.com/users/Fullscreen/gists{/gist_id}","starred_url":"https://api.github.com/users/Fullscreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fullscreen/subscriptions","organizations_url":"https://api.github.com/users/Fullscreen/orgs","repos_url":"https://api.github.com/users/Fullscreen/repos","events_url":"https://api.github.com/users/Fullscreen/events{/privacy}","received_events_url":"https://api.github.com/users/Fullscreen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Fullscreen/generator-cpui","description":"Custom code generator for Creator Platform Angular modules","fork":false,"url":"https://api.github.com/repos/Fullscreen/generator-cpui","forks_url":"https://api.github.com/repos/Fullscreen/generator-cpui/forks","keys_url":"https://api.github.com/repos/Fullscreen/generator-cpui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fullscreen/generator-cpui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fullscreen/generator-cpui/teams","hooks_url":"https://api.github.com/repos/Fullscreen/generator-cpui/hooks","issue_events_url":"https://api.github.com/repos/Fullscreen/generator-cpui/issues/events{/number}","events_url":"https://api.github.com/repos/Fullscreen/generator-cpui/events","assignees_url":"https://api.github.com/repos/Fullscreen/generator-cpui/assignees{/user}","branches_url":"https://api.github.com/repos/Fullscreen/generator-cpui/branches{/branch}","tags_url":"https://api.github.com/repos/Fullscreen/generator-cpui/tags","blobs_url":"https://api.github.com/repos/Fullscreen/generator-cpui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fullscreen/generator-cpui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fullscreen/generator-cpui/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fullscreen/generator-cpui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fullscreen/generator-cpui/statuses/{sha}","languages_url":"https://api.github.com/repos/Fullscreen/generator-cpui/languages","stargazers_url":"https://api.github.com/repos/Fullscreen/generator-cpui/stargazers","contributors_url":"https://api.github.com/repos/Fullscreen/generator-cpui/contributors","subscribers_url":"https://api.github.com/repos/Fullscreen/generator-cpui/subscribers","subscription_url":"https://api.github.com/repos/Fullscreen/generator-cpui/subscription","commits_url":"https://api.github.com/repos/Fullscreen/generator-cpui/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fullscreen/generator-cpui/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fullscreen/generator-cpui/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fullscreen/generator-cpui/issues/comments/{number}","contents_url":"https://api.github.com/repos/Fullscreen/generator-cpui/contents/{+path}","compare_url":"https://api.github.com/repos/Fullscreen/generator-cpui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fullscreen/generator-cpui/merges","archive_url":"https://api.github.com/repos/Fullscreen/generator-cpui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fullscreen/generator-cpui/downloads","issues_url":"https://api.github.com/repos/Fullscreen/generator-cpui/issues{/number}","pulls_url":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls{/number}","milestones_url":"https://api.github.com/repos/Fullscreen/generator-cpui/milestones{/number}","notifications_url":"https://api.github.com/repos/Fullscreen/generator-cpui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fullscreen/generator-cpui/labels{/name}","releases_url":"https://api.github.com/repos/Fullscreen/generator-cpui/releases{/id}","created_at":"2014-06-13T23:18:12Z","updated_at":"2014-08-05T01:43:16Z","pushed_at":"2014-08-08T21:19:23Z","git_url":"git://github.com/Fullscreen/generator-cpui.git","ssh_url":"git@github.com:Fullscreen/generator-cpui.git","clone_url":"https://github.com/Fullscreen/generator-cpui.git","svn_url":"https://github.com/Fullscreen/generator-cpui","homepage":null,"size":456,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"Fullscreen:master","ref":"master","sha":"24be37b8a49eed853e1cd6cac85cb1dfe7c1582d","user":{"login":"Fullscreen","id":682200,"avatar_url":"https://avatars.githubusercontent.com/u/682200?v=2","gravatar_id":"224f077ce541f028790ce6e46fc5871c","url":"https://api.github.com/users/Fullscreen","html_url":"https://github.com/Fullscreen","followers_url":"https://api.github.com/users/Fullscreen/followers","following_url":"https://api.github.com/users/Fullscreen/following{/other_user}","gists_url":"https://api.github.com/users/Fullscreen/gists{/gist_id}","starred_url":"https://api.github.com/users/Fullscreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fullscreen/subscriptions","organizations_url":"https://api.github.com/users/Fullscreen/orgs","repos_url":"https://api.github.com/users/Fullscreen/repos","events_url":"https://api.github.com/users/Fullscreen/events{/privacy}","received_events_url":"https://api.github.com/users/Fullscreen/received_events","type":"Organization","site_admin":false},"repo":{"id":20820520,"name":"generator-cpui","full_name":"Fullscreen/generator-cpui","owner":{"login":"Fullscreen","id":682200,"avatar_url":"https://avatars.githubusercontent.com/u/682200?v=2","gravatar_id":"224f077ce541f028790ce6e46fc5871c","url":"https://api.github.com/users/Fullscreen","html_url":"https://github.com/Fullscreen","followers_url":"https://api.github.com/users/Fullscreen/followers","following_url":"https://api.github.com/users/Fullscreen/following{/other_user}","gists_url":"https://api.github.com/users/Fullscreen/gists{/gist_id}","starred_url":"https://api.github.com/users/Fullscreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fullscreen/subscriptions","organizations_url":"https://api.github.com/users/Fullscreen/orgs","repos_url":"https://api.github.com/users/Fullscreen/repos","events_url":"https://api.github.com/users/Fullscreen/events{/privacy}","received_events_url":"https://api.github.com/users/Fullscreen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Fullscreen/generator-cpui","description":"Custom code generator for Creator Platform Angular modules","fork":false,"url":"https://api.github.com/repos/Fullscreen/generator-cpui","forks_url":"https://api.github.com/repos/Fullscreen/generator-cpui/forks","keys_url":"https://api.github.com/repos/Fullscreen/generator-cpui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fullscreen/generator-cpui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fullscreen/generator-cpui/teams","hooks_url":"https://api.github.com/repos/Fullscreen/generator-cpui/hooks","issue_events_url":"https://api.github.com/repos/Fullscreen/generator-cpui/issues/events{/number}","events_url":"https://api.github.com/repos/Fullscreen/generator-cpui/events","assignees_url":"https://api.github.com/repos/Fullscreen/generator-cpui/assignees{/user}","branches_url":"https://api.github.com/repos/Fullscreen/generator-cpui/branches{/branch}","tags_url":"https://api.github.com/repos/Fullscreen/generator-cpui/tags","blobs_url":"https://api.github.com/repos/Fullscreen/generator-cpui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fullscreen/generator-cpui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fullscreen/generator-cpui/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fullscreen/generator-cpui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fullscreen/generator-cpui/statuses/{sha}","languages_url":"https://api.github.com/repos/Fullscreen/generator-cpui/languages","stargazers_url":"https://api.github.com/repos/Fullscreen/generator-cpui/stargazers","contributors_url":"https://api.github.com/repos/Fullscreen/generator-cpui/contributors","subscribers_url":"https://api.github.com/repos/Fullscreen/generator-cpui/subscribers","subscription_url":"https://api.github.com/repos/Fullscreen/generator-cpui/subscription","commits_url":"https://api.github.com/repos/Fullscreen/generator-cpui/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fullscreen/generator-cpui/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fullscreen/generator-cpui/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fullscreen/generator-cpui/issues/comments/{number}","contents_url":"https://api.github.com/repos/Fullscreen/generator-cpui/contents/{+path}","compare_url":"https://api.github.com/repos/Fullscreen/generator-cpui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fullscreen/generator-cpui/merges","archive_url":"https://api.github.com/repos/Fullscreen/generator-cpui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fullscreen/generator-cpui/downloads","issues_url":"https://api.github.com/repos/Fullscreen/generator-cpui/issues{/number}","pulls_url":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls{/number}","milestones_url":"https://api.github.com/repos/Fullscreen/generator-cpui/milestones{/number}","notifications_url":"https://api.github.com/repos/Fullscreen/generator-cpui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fullscreen/generator-cpui/labels{/name}","releases_url":"https://api.github.com/repos/Fullscreen/generator-cpui/releases{/id}","created_at":"2014-06-13T23:18:12Z","updated_at":"2014-08-05T01:43:16Z","pushed_at":"2014-08-08T21:19:23Z","git_url":"git://github.com/Fullscreen/generator-cpui.git","ssh_url":"git@github.com:Fullscreen/generator-cpui.git","clone_url":"https://github.com/Fullscreen/generator-cpui.git","svn_url":"https://github.com/Fullscreen/generator-cpui","homepage":null,"size":456,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/5"},"html":{"href":"https://github.com/Fullscreen/generator-cpui/pull/5"},"issue":{"href":"https://api.github.com/repos/Fullscreen/generator-cpui/issues/5"},"comments":{"href":"https://api.github.com/repos/Fullscreen/generator-cpui/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Fullscreen/generator-cpui/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/Fullscreen/generator-cpui/statuses/043271ea8e758464dced5d4582af3301a256fa4e"}}}}