{"action":"created","comment":{"url":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/comments/36157330","id":36157330,"diff_hunk":"@@ -0,0 +1,104 @@\n+'use strict';\n+var generators = require('yeoman-generator');\n+var chalk = require('chalk');\n+var yosay = require('yosay');\n+var npm = require('npm');\n+var mkdirp = require('mkdirp');\n+var gitConfig = require('git-config');\n+var camelcase = require('lodash.camelcase');\n+var kebabcase = require('lodash.kebabcase');\n+\n+module.exports = generators.Base.extend({\n+  initializing: function () {\n+    this.pkg = require('../package.json');\n+  },\n+\n+  prompting: function () {\n+    var done = this.async();\n+\n+    // Have Yeoman greet the user.\n+    this.log(yosay(\n+      'Welcome to the ' + chalk.red('Babel Library Boilerplate') + ' generator!'\n+    ));\n+\n+    npm.load(function() {\n+      var config = gitConfig.sync();\n+      var prompts = [{\n+        type: 'input',\n+        name: 'user',\n+        message: 'What is the Github username/organization for this project?',\n+        default: npm.whoami(),\n+        store: true\n+      }, {\n+        type: 'input',\n+        name: 'repo',\n+        message: 'What is the repository/project name?',\n+        default: kebabcase(this.appname)\n+      }, {\n+        type: 'input',\n+        name: 'description',\n+        message: 'What is a short description for this project?'\n+      }, {\n+        type: 'input',\n+        name: 'author',\n+        message: 'Who is the author of this project?',\n+        default: config.user.name + ' <' + config.user.email + '>',\n+        store: true\n+      }, {\n+        type: 'input',\n+        name: 'variable',\n+        message: 'What is the name of this project\\'s main variable?',\n+        default: camelcase(this.appname)\n+      }, {\n+        type: 'confirm',\n+        name: 'global',\n+        message: 'Expose that variable as a browser global?',\n+        default: true\n+      }];\n+\n+      this.prompt(prompts, function (props) {\n+        this.user = props.user;\n+        this.repo = props.repo;\n+        this.description = props.description;\n+        this.author = props.author;\n+        this.global = props.global;\n+        this.variable = props.variable;\n+        done();\n+      }.bind(this));\n+    }.bind(this));\n+  },\n+\n+  writing: {\n+    app: function () {\n+      this.template('babelrc', '.babelrc');\n+      this.template('jscsrc', '.jscsrc');\n+      this.template('travis.yml', '.travis.yml');\n+      this.template('eslintrc', '.eslintrc');\n+      this.template('_package.json', 'package.json');\n+      this.template('LICENSE', 'LICENSE');\n+      this.template('README.md', 'README.md');\n+      this.template('CHANGELOG.md', 'CHANGELOG.md');\n+      this.template('gitignore', '.gitignore');\n+      this.template('gulpfile.js', 'gulpfile.js');\n+      mkdirp.sync('src');\n+      this.template('src/index.js', 'src/' + this.repo + '.js');\n+      mkdirp.sync('test');\n+      this.template('test/eslintrc', 'test/.eslintrc');\n+      this.template('test/runner.html', 'test/runner.html');\n+      mkdirp.sync('test/setup');\n+      this.template('test/setup/browserify.js', 'test/setup/browserify.js');\n+      this.template('test/setup/node.js', 'test/setup/node.js');\n+      this.template('test/setup/setup.js', 'test/setup/setup.js');\n+      mkdirp.sync('test/unit');\n+      this.template('test/unit/index.js', 'test/unit/' + this.repo + '.js');","path":"app/index.js","position":100,"original_position":93,"commit_id":"4525c87f9c2f28a2b439dcea77e8274dc0921a03","original_commit_id":"9a4e662d88e1d7eb4ad03dcc695fe0ca48477dff","user":{"login":"megawac","id":3475472,"avatar_url":"https://avatars.githubusercontent.com/u/3475472?v=3","gravatar_id":"","url":"https://api.github.com/users/megawac","html_url":"https://github.com/megawac","followers_url":"https://api.github.com/users/megawac/followers","following_url":"https://api.github.com/users/megawac/following{/other_user}","gists_url":"https://api.github.com/users/megawac/gists{/gist_id}","starred_url":"https://api.github.com/users/megawac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megawac/subscriptions","organizations_url":"https://api.github.com/users/megawac/orgs","repos_url":"https://api.github.com/users/megawac/repos","events_url":"https://api.github.com/users/megawac/events{/privacy}","received_events_url":"https://api.github.com/users/megawac/received_events","type":"User","site_admin":false},"body":"Thoughts james?","created_at":"2015-08-04T04:54:36Z","updated_at":"2015-08-04T04:54:36Z","html_url":"https://github.com/babel/generator-babel-boilerplate/pull/197#discussion_r36157330","pull_request_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/197","_links":{"self":{"href":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/comments/36157330"},"html":{"href":"https://github.com/babel/generator-babel-boilerplate/pull/197#discussion_r36157330"},"pull_request":{"href":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/197"}}},"pull_request":{"url":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/197","id":41432725,"html_url":"https://github.com/babel/generator-babel-boilerplate/pull/197","diff_url":"https://github.com/babel/generator-babel-boilerplate/pull/197.diff","patch_url":"https://github.com/babel/generator-babel-boilerplate/pull/197.patch","issue_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/issues/197","number":197,"state":"closed","locked":false,"title":"Yeoman","user":{"login":"jmeas","id":2322305,"avatar_url":"https://avatars.githubusercontent.com/u/2322305?v=3","gravatar_id":"","url":"https://api.github.com/users/jmeas","html_url":"https://github.com/jmeas","followers_url":"https://api.github.com/users/jmeas/followers","following_url":"https://api.github.com/users/jmeas/following{/other_user}","gists_url":"https://api.github.com/users/jmeas/gists{/gist_id}","starred_url":"https://api.github.com/users/jmeas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmeas/subscriptions","organizations_url":"https://api.github.com/users/jmeas/orgs","repos_url":"https://api.github.com/users/jmeas/repos","events_url":"https://api.github.com/users/jmeas/events{/privacy}","received_events_url":"https://api.github.com/users/jmeas/received_events","type":"User","site_admin":false},"body":"Resolves #58 \r\n\r\n===\r\n\r\n- [x] Differentiate `package.json`s\r\n- [x] Move actual `deps` from `devDeps` in generator package.json\r\n- [x] Ensure all files are copied over\r\n- [x] Update variables in those files\r\n- [x] Figure out API for not exporting a global\r\n- [x] Add generator tests\r\n- [x] Update Travis test for the generator\r\n- [x] Fix Travis (//cc @thejameskyle / @megawac )\r\n- [x] Update README\r\n- [x] Remove global var option\r\n- [x] Fix license escaping\r\n- [x] Update name of initial test","created_at":"2015-08-03T03:35:14Z","updated_at":"2015-08-04T04:54:36Z","closed_at":"2015-08-04T04:51:53Z","merged_at":"2015-08-04T04:51:53Z","merge_commit_sha":"927570a7e62f4b2e0dd05bbb455ad1fcb09539a8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/197/commits","review_comments_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/197/comments","review_comment_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/issues/197/comments","statuses_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/statuses/4525c87f9c2f28a2b439dcea77e8274dc0921a03","head":{"label":"babel:yeoman","ref":"yeoman","sha":"4525c87f9c2f28a2b439dcea77e8274dc0921a03","user":{"login":"babel","id":9637642,"avatar_url":"https://avatars.githubusercontent.com/u/9637642?v=3","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"repo":{"id":29377344,"name":"generator-babel-boilerplate","full_name":"babel/generator-babel-boilerplate","owner":{"login":"babel","id":9637642,"avatar_url":"https://avatars.githubusercontent.com/u/9637642?v=3","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/babel/generator-babel-boilerplate","description":"A Yeoman generator to author libraries in ES2015 (and beyond!) for Node and the browser.","fork":false,"url":"https://api.github.com/repos/babel/generator-babel-boilerplate","forks_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/forks","keys_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/teams","hooks_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/hooks","issue_events_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/issues/events{/number}","events_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/events","assignees_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/assignees{/user}","branches_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/branches{/branch}","tags_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/tags","blobs_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/git/refs{/sha}","trees_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/statuses/{sha}","languages_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/languages","stargazers_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/stargazers","contributors_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/contributors","subscribers_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/subscribers","subscription_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/subscription","commits_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/commits{/sha}","git_commits_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/git/commits{/sha}","comments_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/comments{/number}","issue_comment_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/issues/comments{/number}","contents_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/contents/{+path}","compare_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/merges","archive_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/downloads","issues_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/issues{/number}","pulls_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls{/number}","milestones_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/milestones{/number}","notifications_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/labels{/name}","releases_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/releases{/id}","created_at":"2015-01-17T02:36:55Z","updated_at":"2015-08-04T04:53:05Z","pushed_at":"2015-08-04T04:52:38Z","git_url":"git://github.com/babel/generator-babel-boilerplate.git","ssh_url":"git@github.com:babel/generator-babel-boilerplate.git","clone_url":"https://github.com/babel/generator-babel-boilerplate.git","svn_url":"https://github.com/babel/generator-babel-boilerplate","homepage":"","size":1233,"stargazers_count":157,"watchers_count":157,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":8,"forks":27,"open_issues":8,"watchers":157,"default_branch":"master"}},"base":{"label":"babel:master","ref":"master","sha":"d6510d28f607857fad0caac9f9cda01fc25d03be","user":{"login":"babel","id":9637642,"avatar_url":"https://avatars.githubusercontent.com/u/9637642?v=3","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"repo":{"id":29377344,"name":"generator-babel-boilerplate","full_name":"babel/generator-babel-boilerplate","owner":{"login":"babel","id":9637642,"avatar_url":"https://avatars.githubusercontent.com/u/9637642?v=3","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/babel/generator-babel-boilerplate","description":"A Yeoman generator to author libraries in ES2015 (and beyond!) for Node and the browser.","fork":false,"url":"https://api.github.com/repos/babel/generator-babel-boilerplate","forks_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/forks","keys_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/teams","hooks_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/hooks","issue_events_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/issues/events{/number}","events_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/events","assignees_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/assignees{/user}","branches_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/branches{/branch}","tags_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/tags","blobs_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/git/refs{/sha}","trees_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/statuses/{sha}","languages_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/languages","stargazers_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/stargazers","contributors_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/contributors","subscribers_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/subscribers","subscription_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/subscription","commits_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/commits{/sha}","git_commits_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/git/commits{/sha}","comments_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/comments{/number}","issue_comment_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/issues/comments{/number}","contents_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/contents/{+path}","compare_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/merges","archive_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/downloads","issues_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/issues{/number}","pulls_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls{/number}","milestones_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/milestones{/number}","notifications_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/labels{/name}","releases_url":"https://api.github.com/repos/babel/generator-babel-boilerplate/releases{/id}","created_at":"2015-01-17T02:36:55Z","updated_at":"2015-08-04T04:53:05Z","pushed_at":"2015-08-04T04:52:38Z","git_url":"git://github.com/babel/generator-babel-boilerplate.git","ssh_url":"git@github.com:babel/generator-babel-boilerplate.git","clone_url":"https://github.com/babel/generator-babel-boilerplate.git","svn_url":"https://github.com/babel/generator-babel-boilerplate","homepage":"","size":1233,"stargazers_count":157,"watchers_count":157,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":8,"forks":27,"open_issues":8,"watchers":157,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/197"},"html":{"href":"https://github.com/babel/generator-babel-boilerplate/pull/197"},"issue":{"href":"https://api.github.com/repos/babel/generator-babel-boilerplate/issues/197"},"comments":{"href":"https://api.github.com/repos/babel/generator-babel-boilerplate/issues/197/comments"},"review_comments":{"href":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/197/comments"},"review_comment":{"href":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/babel/generator-babel-boilerplate/pulls/197/commits"},"statuses":{"href":"https://api.github.com/repos/babel/generator-babel-boilerplate/statuses/4525c87f9c2f28a2b439dcea77e8274dc0921a03"}}}}