{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/comments/178072762","pull_request_review_id":108068726,"id":178072762,"diff_hunk":"@@ -13,13 +21,106 @@ gulp.task('run-angular', function (cb) {\n     });\r\n });\r\n \r\n-gulp.task('run-server',  (cb) => {\r\n+gulp.task('run-server', (cb) => {\r\n     const runServerCommand = process.platform === 'win32' ? 'yarn run watch' : 'yarn run watchu';\r\n     shell.cd('server');\r\n     shell.exec('yarn install');\r\n-    shell.exec('gulp build-all', {async:true});\r\n+    shell.exec('gulp build-all', { async: true });\r\n     shell.exec(runServerCommand, (code, stdout, stderr) => {\r\n         cb();\r\n     });\r\n-    \r\n+\r\n+});\r\n+\r\n+\r\n+\r\n+\r\n+///PRODUCTION BUILD\r\n+gulp.task('build-server-production', (cb) => {\r\n+    shell.cd('server');\r\n+    shell.exec('yarn install');\r\n+    shell.exec('yarn run gulp build-production');\r\n+    const tsProject = ts.createProject('tsconfig.json');\r\n+    const tsResult = gulp.src('src/**/*.ts').pipe(tsProject());\r\n+    return tsResult.js.pipe(gulp.dest('build'));\r\n+});\r\n+\r\n+gulp.task('copy-server-to-artifacts', ['build-server-production'], (cb) => {\r\n+    const outDir = path.normalize(argv.outDir);\r\n+    if (!outDir) {\r\n+        return;\r\n+    }\r\n+    return gulp.src('build/**/*').pipe(gulp.dest(outDir));\r\n+});\r\n+\r\n+gulp.task('build-ng-production', (cb) => {\r\n+    const outDir = path.join(path.normalize(argv.outDir), 'public', 'ng-min');\r\n+    if (!outDir) {\r\n+        return;\r\n+    }\r\n+    shell.cd('AzureFunctions.AngularClient');\r\n+    const folder =\r\n+        shell.exec(`yarn run ng build --progress false --prod --environment=prod --output-path=\"${outDir}\"`);\r\n+    cb();\r\n+});\r\n+\r\n+gulp.task('build-ng-debug', (cb) => {\r\n+    const outDir = path.join(path.normalize(argv.outDir), 'public', 'ng-full');\r\n+    if (!outDir) {\r\n+        return;\r\n+    }\r\n+    shell.cd('AzureFunctions.AngularClient');\r\n+    shell.exec(`yarn run ng build --progress false --output-path=\"${outDir}\"`);\r\n+    cb();\r\n+});\r\n+\r\n+gulp.task('ng-yarn', (cb) => {\r\n+    shell.cd('AzureFunctions.AngularClient');\r\n+    shell.exec('yarn install');\r\n+});\r\n+\r\n+gulp.task('build-production', async (cb) => {\r\n+    const outDir = path.normalize(argv.outDir);\r\n+    if (!outDir) {\r\n+        return;\r\n+    }\r\n+    shell.exec('yarn run gulp ng-yarn');\r","path":"gulpfile.js","position":87,"original_position":87,"commit_id":"c9ecbfe2796b778cdd03aa198947a1f5bedda5b2","original_commit_id":"c9ecbfe2796b778cdd03aa198947a1f5bedda5b2","user":{"login":"ehamai","id":5695405,"avatar_url":"https://avatars2.githubusercontent.com/u/5695405?v=4","gravatar_id":"","url":"https://api.github.com/users/ehamai","html_url":"https://github.com/ehamai","followers_url":"https://api.github.com/users/ehamai/followers","following_url":"https://api.github.com/users/ehamai/following{/other_user}","gists_url":"https://api.github.com/users/ehamai/gists{/gist_id}","starred_url":"https://api.github.com/users/ehamai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehamai/subscriptions","organizations_url":"https://api.github.com/users/ehamai/orgs","repos_url":"https://api.github.com/users/ehamai/repos","events_url":"https://api.github.com/users/ehamai/events{/privacy}","received_events_url":"https://api.github.com/users/ehamai/received_events","type":"User","site_admin":false},"body":">shell.exec('yarn run gulp ng-yarn'); [](start = 4, length = 36)\r\n\r\nWhy don't you just move this as a step inside of build-ng-production?  That way if you ever call build-ng-production by itself, it will automatically handle the yarn install?","created_at":"2018-03-29T14:25:34Z","updated_at":"2018-03-29T14:25:35Z","html_url":"https://github.com/Azure/azure-functions-ux/pull/2495#discussion_r178072762","pull_request_url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2495","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/comments/178072762"},"html":{"href":"https://github.com/Azure/azure-functions-ux/pull/2495#discussion_r178072762"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2495"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2495","id":178191756,"html_url":"https://github.com/Azure/azure-functions-ux/pull/2495","diff_url":"https://github.com/Azure/azure-functions-ux/pull/2495.diff","patch_url":"https://github.com/Azure/azure-functions-ux/pull/2495.patch","issue_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues/2495","number":2495,"state":"open","locked":false,"title":"Provides a single command for a complete packaged production build","user":{"login":"hartra344","id":13208452,"avatar_url":"https://avatars2.githubusercontent.com/u/13208452?v=4","gravatar_id":"","url":"https://api.github.com/users/hartra344","html_url":"https://github.com/hartra344","followers_url":"https://api.github.com/users/hartra344/followers","following_url":"https://api.github.com/users/hartra344/following{/other_user}","gists_url":"https://api.github.com/users/hartra344/gists{/gist_id}","starred_url":"https://api.github.com/users/hartra344/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hartra344/subscriptions","organizations_url":"https://api.github.com/users/hartra344/orgs","repos_url":"https://api.github.com/users/hartra344/repos","events_url":"https://api.github.com/users/hartra344/events{/privacy}","received_events_url":"https://api.github.com/users/hartra344/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-28T23:29:44Z","updated_at":"2018-03-29T14:25:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8991a0bcb1a39130ab11d0be8ec2fcfb6b9f393","assignee":null,"assignees":[],"requested_reviewers":[{"login":"nertim","id":493476,"avatar_url":"https://avatars2.githubusercontent.com/u/493476?v=4","gravatar_id":"","url":"https://api.github.com/users/nertim","html_url":"https://github.com/nertim","followers_url":"https://api.github.com/users/nertim/followers","following_url":"https://api.github.com/users/nertim/following{/other_user}","gists_url":"https://api.github.com/users/nertim/gists{/gist_id}","starred_url":"https://api.github.com/users/nertim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nertim/subscriptions","organizations_url":"https://api.github.com/users/nertim/orgs","repos_url":"https://api.github.com/users/nertim/repos","events_url":"https://api.github.com/users/nertim/events{/privacy}","received_events_url":"https://api.github.com/users/nertim/received_events","type":"User","site_admin":false},{"login":"ahmelsayed","id":645740,"avatar_url":"https://avatars0.githubusercontent.com/u/645740?v=4","gravatar_id":"","url":"https://api.github.com/users/ahmelsayed","html_url":"https://github.com/ahmelsayed","followers_url":"https://api.github.com/users/ahmelsayed/followers","following_url":"https://api.github.com/users/ahmelsayed/following{/other_user}","gists_url":"https://api.github.com/users/ahmelsayed/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmelsayed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmelsayed/subscriptions","organizations_url":"https://api.github.com/users/ahmelsayed/orgs","repos_url":"https://api.github.com/users/ahmelsayed/repos","events_url":"https://api.github.com/users/ahmelsayed/events{/privacy}","received_events_url":"https://api.github.com/users/ahmelsayed/received_events","type":"User","site_admin":false},{"login":"agruning","id":8560637,"avatar_url":"https://avatars0.githubusercontent.com/u/8560637?v=4","gravatar_id":"","url":"https://api.github.com/users/agruning","html_url":"https://github.com/agruning","followers_url":"https://api.github.com/users/agruning/followers","following_url":"https://api.github.com/users/agruning/following{/other_user}","gists_url":"https://api.github.com/users/agruning/gists{/gist_id}","starred_url":"https://api.github.com/users/agruning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agruning/subscriptions","organizations_url":"https://api.github.com/users/agruning/orgs","repos_url":"https://api.github.com/users/agruning/repos","events_url":"https://api.github.com/users/agruning/events{/privacy}","received_events_url":"https://api.github.com/users/agruning/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2495/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2495/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues/2495/comments","statuses_url":"https://api.github.com/repos/Azure/azure-functions-ux/statuses/c9ecbfe2796b778cdd03aa198947a1f5bedda5b2","head":{"label":"Azure:release","ref":"release","sha":"c9ecbfe2796b778cdd03aa198947a1f5bedda5b2","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":50877831,"name":"azure-functions-ux","full_name":"Azure/azure-functions-ux","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-functions-ux","description":"Azure Functions UX","fork":false,"url":"https://api.github.com/repos/Azure/azure-functions-ux","forks_url":"https://api.github.com/repos/Azure/azure-functions-ux/forks","keys_url":"https://api.github.com/repos/Azure/azure-functions-ux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-functions-ux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-functions-ux/teams","hooks_url":"https://api.github.com/repos/Azure/azure-functions-ux/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-functions-ux/events","assignees_url":"https://api.github.com/repos/Azure/azure-functions-ux/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-functions-ux/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-functions-ux/tags","blobs_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-functions-ux/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-functions-ux/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-functions-ux/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-functions-ux/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-functions-ux/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-functions-ux/subscription","commits_url":"https://api.github.com/repos/Azure/azure-functions-ux/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-functions-ux/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-functions-ux/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-functions-ux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-functions-ux/merges","archive_url":"https://api.github.com/repos/Azure/azure-functions-ux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-functions-ux/downloads","issues_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-functions-ux/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-functions-ux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-functions-ux/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-functions-ux/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-functions-ux/deployments","created_at":"2016-02-01T23:01:22Z","updated_at":"2018-03-28T17:56:59Z","pushed_at":"2018-03-28T23:37:31Z","git_url":"git://github.com/Azure/azure-functions-ux.git","ssh_url":"git@github.com:Azure/azure-functions-ux.git","clone_url":"https://github.com/Azure/azure-functions-ux.git","svn_url":"https://github.com/Azure/azure-functions-ux","homepage":"https://functions.azure.com","size":16992,"stargazers_count":141,"watchers_count":141,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":252,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":55,"open_issues":252,"watchers":141,"default_branch":"dev"}},"base":{"label":"Azure:dev","ref":"dev","sha":"745f699a1bd200d0f1145fd4c591347a89ca83fd","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":50877831,"name":"azure-functions-ux","full_name":"Azure/azure-functions-ux","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-functions-ux","description":"Azure Functions UX","fork":false,"url":"https://api.github.com/repos/Azure/azure-functions-ux","forks_url":"https://api.github.com/repos/Azure/azure-functions-ux/forks","keys_url":"https://api.github.com/repos/Azure/azure-functions-ux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-functions-ux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-functions-ux/teams","hooks_url":"https://api.github.com/repos/Azure/azure-functions-ux/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-functions-ux/events","assignees_url":"https://api.github.com/repos/Azure/azure-functions-ux/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-functions-ux/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-functions-ux/tags","blobs_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-functions-ux/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-functions-ux/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-functions-ux/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-functions-ux/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-functions-ux/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-functions-ux/subscription","commits_url":"https://api.github.com/repos/Azure/azure-functions-ux/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-functions-ux/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-functions-ux/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-functions-ux/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-functions-ux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-functions-ux/merges","archive_url":"https://api.github.com/repos/Azure/azure-functions-ux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-functions-ux/downloads","issues_url":"https://api.github.com/repos/Azure/azure-functions-ux/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-functions-ux/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-functions-ux/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-functions-ux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-functions-ux/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-functions-ux/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-functions-ux/deployments","created_at":"2016-02-01T23:01:22Z","updated_at":"2018-03-28T17:56:59Z","pushed_at":"2018-03-28T23:37:31Z","git_url":"git://github.com/Azure/azure-functions-ux.git","ssh_url":"git@github.com:Azure/azure-functions-ux.git","clone_url":"https://github.com/Azure/azure-functions-ux.git","svn_url":"https://github.com/Azure/azure-functions-ux","homepage":"https://functions.azure.com","size":16992,"stargazers_count":141,"watchers_count":141,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":252,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":55,"open_issues":252,"watchers":141,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2495"},"html":{"href":"https://github.com/Azure/azure-functions-ux/pull/2495"},"issue":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/issues/2495"},"comments":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/issues/2495/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2495/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/pulls/2495/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-functions-ux/statuses/c9ecbfe2796b778cdd03aa198947a1f5bedda5b2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ehamai"}}