{"action":"created","comment":{"url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/comments/23138788","id":23138788,"diff_hunk":"@@ -1,61 +1,92 @@\n-var browserify = require('gulp-browserify');\n-var clean = require('gulp-clean');\n+\n+/**\n+ * Dependencies.\n+ */\n+\n var gulp = require('gulp');\n-var jsx = require('gulp-jsx');\n+var del = require('del');\n+var react = require('gulp-react');\n+var browserify = require('gulp-browserify');\n var reactify = require('reactify');\n-var run = require('gulp-run');\n-var runSequence = require('run-sequence');\n-var shell = require('gulp-shell');\n var yaml = require('gulp-yaml');\n \n+/**\n+ * Build Paths.\n+ */\n+\n var paths = {\n-  js: ['client/**/*.js'],\n-  jsx: ['client/**/*.jsx'],\n-  queries: ['client/**/*.yaml']\n+\n+  // src\n+  appJs: ['src/app/**/*.js'],\n+  serverJs: ['src/server/**/*.js'],\n+  jsx: ['src/app/**/*.jsx'],\n+  queries: ['src/server/**/*-queries.yaml'],\n+\n+  // dist\n+  distPrivateServer: 'dist/private/server',\n+  distPrivateApp: 'dist/private/app',\n+  distPublic: 'dist/public'\n+\n };\n \n-// Remove built files.\n-gulp.task('clean', function(callback) {\n-  return gulp.src('public/**/*')\n-    .pipe(clean());\n-});\n+/**\n+ * Clean task.\n+ */\n \n-// Top-level build task.\n-gulp.task('build', function(callback) {\n-    runSequence(['copy-js', 'build-jsx', 'build-queries'], 'browserify', callback);\n+gulp.task('clean', function (cb) {\n+  del(['dist'], cb);\n });\n \n-// Convert the yaml to json.\n+/**\n+ * Build task.\n+ */\n+\n gulp.task('build-queries', function() {\n   return gulp.src(paths.queries)\n     .pipe(yaml())\n-    .pipe(gulp.dest('public'));\n+    .pipe(gulp.dest(paths.distPrivateServer));\n+});\n+\n+gulp.task('copy-server-js', function() {\n+  return gulp.src(paths.serverJs)\n+    .pipe(gulp.dest(paths.distPrivateServer));\n });\n \n-// Copy the js files.\n-gulp.task('copy-js', function() {\n-  return gulp.src(paths.js)\n-    .pipe(gulp.dest('public'));\n+gulp.task('copy-app-js', function() {\n+  return gulp.src(paths.appJs)\n+    .pipe(gulp.dest(paths.distPrivateApp));\n });\n \n-// Build the jsx files.\n-gulp.task('build-jsx', shell.task([\n-    'jsx -x jsx client/ public/'\n-]));\n+gulp.task('copy-js', ['copy-app-js','copy-server-js']);\n+\n+gulp.task('convert-jsx', function() {\n+  return gulp.src(paths.jsx)\n+    .pipe(react())\n+    .pipe(gulp.dest(paths.distPrivateApp));\n+});\n \n gulp.task('browserify', function() {\n-  return gulp.src('client/client.js')\n+  return gulp.src('src/app/client.js')","path":"gulpfile.js","position":97,"original_position":97,"commit_id":"5e6e3a284dcb3e61ef50d3db374a63e4e41cd04a","original_commit_id":"5e6e3a284dcb3e61ef50d3db374a63e4e41cd04a","user":{"login":"theazureshadow","id":727514,"avatar_url":"https://avatars.githubusercontent.com/u/727514?v=3","gravatar_id":"","url":"https://api.github.com/users/theazureshadow","html_url":"https://github.com/theazureshadow","followers_url":"https://api.github.com/users/theazureshadow/followers","following_url":"https://api.github.com/users/theazureshadow/following{/other_user}","gists_url":"https://api.github.com/users/theazureshadow/gists{/gist_id}","starred_url":"https://api.github.com/users/theazureshadow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theazureshadow/subscriptions","organizations_url":"https://api.github.com/users/theazureshadow/orgs","repos_url":"https://api.github.com/users/theazureshadow/repos","events_url":"https://api.github.com/users/theazureshadow/events{/privacy}","received_events_url":"https://api.github.com/users/theazureshadow/received_events","type":"User","site_admin":false},"body":"Could this be a path in the `paths` global?","created_at":"2015-01-19T00:27:55Z","updated_at":"2015-01-19T00:27:55Z","html_url":"https://github.com/blendersfun/seattle-theatre-site/pull/5#discussion_r23138788","pull_request_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/comments/23138788"},"html":{"href":"https://github.com/blendersfun/seattle-theatre-site/pull/5#discussion_r23138788"},"pull_request":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/5","id":27579820,"html_url":"https://github.com/blendersfun/seattle-theatre-site/pull/5","diff_url":"https://github.com/blendersfun/seattle-theatre-site/pull/5.diff","patch_url":"https://github.com/blendersfun/seattle-theatre-site/pull/5.patch","issue_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/issues/5","number":5,"state":"open","locked":false,"title":"Build improvements","user":{"login":"blendersfun","id":859223,"avatar_url":"https://avatars.githubusercontent.com/u/859223?v=3","gravatar_id":"","url":"https://api.github.com/users/blendersfun","html_url":"https://github.com/blendersfun","followers_url":"https://api.github.com/users/blendersfun/followers","following_url":"https://api.github.com/users/blendersfun/following{/other_user}","gists_url":"https://api.github.com/users/blendersfun/gists{/gist_id}","starred_url":"https://api.github.com/users/blendersfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendersfun/subscriptions","organizations_url":"https://api.github.com/users/blendersfun/orgs","repos_url":"https://api.github.com/users/blendersfun/repos","events_url":"https://api.github.com/users/blendersfun/events{/privacy}","received_events_url":"https://api.github.com/users/blendersfun/received_events","type":"User","site_admin":false},"body":"Separated transformed jsx into different places based on how it is consumed:\r\n  /private -- intended to be consumed by the server node.js script (said script will live in here and be invoked from here)\r\n  /public -- webroot. Client-side bundles will be dropped in here.","created_at":"2015-01-19T00:23:09Z","updated_at":"2015-01-19T00:27:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"300fc412b65fc77d4463fabdbc81b6b53aa0faef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/5/commits","review_comments_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/5/comments","review_comment_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/comments/{number}","comments_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/issues/5/comments","statuses_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/statuses/5e6e3a284dcb3e61ef50d3db374a63e4e41cd04a","head":{"label":"blendersfun:build-improvements","ref":"build-improvements","sha":"5e6e3a284dcb3e61ef50d3db374a63e4e41cd04a","user":{"login":"blendersfun","id":859223,"avatar_url":"https://avatars.githubusercontent.com/u/859223?v=3","gravatar_id":"","url":"https://api.github.com/users/blendersfun","html_url":"https://github.com/blendersfun","followers_url":"https://api.github.com/users/blendersfun/followers","following_url":"https://api.github.com/users/blendersfun/following{/other_user}","gists_url":"https://api.github.com/users/blendersfun/gists{/gist_id}","starred_url":"https://api.github.com/users/blendersfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendersfun/subscriptions","organizations_url":"https://api.github.com/users/blendersfun/orgs","repos_url":"https://api.github.com/users/blendersfun/repos","events_url":"https://api.github.com/users/blendersfun/events{/privacy}","received_events_url":"https://api.github.com/users/blendersfun/received_events","type":"User","site_admin":false},"repo":{"id":28368901,"name":"seattle-theatre-site","full_name":"blendersfun/seattle-theatre-site","owner":{"login":"blendersfun","id":859223,"avatar_url":"https://avatars.githubusercontent.com/u/859223?v=3","gravatar_id":"","url":"https://api.github.com/users/blendersfun","html_url":"https://github.com/blendersfun","followers_url":"https://api.github.com/users/blendersfun/followers","following_url":"https://api.github.com/users/blendersfun/following{/other_user}","gists_url":"https://api.github.com/users/blendersfun/gists{/gist_id}","starred_url":"https://api.github.com/users/blendersfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendersfun/subscriptions","organizations_url":"https://api.github.com/users/blendersfun/orgs","repos_url":"https://api.github.com/users/blendersfun/repos","events_url":"https://api.github.com/users/blendersfun/events{/privacy}","received_events_url":"https://api.github.com/users/blendersfun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blendersfun/seattle-theatre-site","description":"A site for finding theatrical productions in Seattle, and educating oneself about theatre art both generally, and as it pertains to the Seattle scene.","fork":false,"url":"https://api.github.com/repos/blendersfun/seattle-theatre-site","forks_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/forks","keys_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/teams","hooks_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/hooks","issue_events_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/issues/events{/number}","events_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/events","assignees_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/assignees{/user}","branches_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/branches{/branch}","tags_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/tags","blobs_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/statuses/{sha}","languages_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/languages","stargazers_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/stargazers","contributors_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/contributors","subscribers_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/subscribers","subscription_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/subscription","commits_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/issues/comments/{number}","contents_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/contents/{+path}","compare_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/merges","archive_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/downloads","issues_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/issues{/number}","pulls_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls{/number}","milestones_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/milestones{/number}","notifications_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/labels{/name}","releases_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/releases{/id}","created_at":"2014-12-23T01:06:29Z","updated_at":"2015-01-11T22:35:09Z","pushed_at":"2015-01-19T00:19:59Z","git_url":"git://github.com/blendersfun/seattle-theatre-site.git","ssh_url":"git@github.com:blendersfun/seattle-theatre-site.git","clone_url":"https://github.com/blendersfun/seattle-theatre-site.git","svn_url":"https://github.com/blendersfun/seattle-theatre-site","homepage":null,"size":424,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"blendersfun:master","ref":"master","sha":"47dcc8bc7da3cdf779f39275e16c6eee94db243b","user":{"login":"blendersfun","id":859223,"avatar_url":"https://avatars.githubusercontent.com/u/859223?v=3","gravatar_id":"","url":"https://api.github.com/users/blendersfun","html_url":"https://github.com/blendersfun","followers_url":"https://api.github.com/users/blendersfun/followers","following_url":"https://api.github.com/users/blendersfun/following{/other_user}","gists_url":"https://api.github.com/users/blendersfun/gists{/gist_id}","starred_url":"https://api.github.com/users/blendersfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendersfun/subscriptions","organizations_url":"https://api.github.com/users/blendersfun/orgs","repos_url":"https://api.github.com/users/blendersfun/repos","events_url":"https://api.github.com/users/blendersfun/events{/privacy}","received_events_url":"https://api.github.com/users/blendersfun/received_events","type":"User","site_admin":false},"repo":{"id":28368901,"name":"seattle-theatre-site","full_name":"blendersfun/seattle-theatre-site","owner":{"login":"blendersfun","id":859223,"avatar_url":"https://avatars.githubusercontent.com/u/859223?v=3","gravatar_id":"","url":"https://api.github.com/users/blendersfun","html_url":"https://github.com/blendersfun","followers_url":"https://api.github.com/users/blendersfun/followers","following_url":"https://api.github.com/users/blendersfun/following{/other_user}","gists_url":"https://api.github.com/users/blendersfun/gists{/gist_id}","starred_url":"https://api.github.com/users/blendersfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blendersfun/subscriptions","organizations_url":"https://api.github.com/users/blendersfun/orgs","repos_url":"https://api.github.com/users/blendersfun/repos","events_url":"https://api.github.com/users/blendersfun/events{/privacy}","received_events_url":"https://api.github.com/users/blendersfun/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blendersfun/seattle-theatre-site","description":"A site for finding theatrical productions in Seattle, and educating oneself about theatre art both generally, and as it pertains to the Seattle scene.","fork":false,"url":"https://api.github.com/repos/blendersfun/seattle-theatre-site","forks_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/forks","keys_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/teams","hooks_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/hooks","issue_events_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/issues/events{/number}","events_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/events","assignees_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/assignees{/user}","branches_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/branches{/branch}","tags_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/tags","blobs_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/statuses/{sha}","languages_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/languages","stargazers_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/stargazers","contributors_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/contributors","subscribers_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/subscribers","subscription_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/subscription","commits_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/issues/comments/{number}","contents_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/contents/{+path}","compare_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/merges","archive_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/downloads","issues_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/issues{/number}","pulls_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls{/number}","milestones_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/milestones{/number}","notifications_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/labels{/name}","releases_url":"https://api.github.com/repos/blendersfun/seattle-theatre-site/releases{/id}","created_at":"2014-12-23T01:06:29Z","updated_at":"2015-01-11T22:35:09Z","pushed_at":"2015-01-19T00:19:59Z","git_url":"git://github.com/blendersfun/seattle-theatre-site.git","ssh_url":"git@github.com:blendersfun/seattle-theatre-site.git","clone_url":"https://github.com/blendersfun/seattle-theatre-site.git","svn_url":"https://github.com/blendersfun/seattle-theatre-site","homepage":null,"size":424,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/5"},"html":{"href":"https://github.com/blendersfun/seattle-theatre-site/pull/5"},"issue":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site/issues/5"},"comments":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/blendersfun/seattle-theatre-site/statuses/5e6e3a284dcb3e61ef50d3db374a63e4e41cd04a"}}}}