{"action":"created","comment":{"url":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/comments/54105201","id":54105201,"diff_hunk":"@@ -0,0 +1,171 @@\n+var argv = require('yargs').argv;\n+var autoprefixer = require('gulp-autoprefixer');\n+var bower = require('gulp-bower');\n+var concat = require('gulp-concat');\n+var clean = require('gulp-clean');\n+var csscomb = require('gulp-csscomb');\n+var cssnano = require('gulp-cssnano');\n+var debug = require('gulp-debug');\n+var declare = require('gulp-declare');\n+var gitmodified0 = require('gulp-gitmodified');\n+var gulp = require('gulp');\n+var gulpif = require('gulp-if');\n+var handlebars = require('gulp-handlebars');\n+var htmlhint = require(\"gulp-htmlhint\");\n+var htmlmin = require('gulp-htmlmin');\n+var jscs = require('gulp-jscs');\n+var jshint = require('gulp-jshint');\n+var less = require('gulp-less');\n+var livereload = require('gulp-livereload');\n+var runSequence = require('run-sequence');\n+var sourcemaps = require('gulp-sourcemaps');\n+var uglify = require('gulp-uglify');\n+var wrap = require('gulp-wrap');\n+\n+var srcDir = 'src';\n+var buildDir = 'build';\n+var libDir = buildDir + '/lib';\n+var clientDir = buildDir + '/client';\n+var clientStaticDir = clientDir + '/static';\n+var clientLibDir = clientDir + \"/lib\";\n+var jsMapDir = 'maps';\n+var cssMapDir = '.';\n+var isProd = argv.prod;\n+var isAll = argv.all;\n+\n+var path = {\n+    html: srcDir + '/**/*.html',\n+    images: srcDir + '/**/*.{png,jpg,svg}',\n+    scripts: srcDir + '/**/*.js',\n+    templates: srcDir + '/blocks/**/*.hbs',\n+    css: srcDir + '/**/*.less'\n+};\n+\n+gulp.task('default', function (cb) {\n+    runSequence('clean', 'bower', 'libs', 'build', cb);\n+});\n+\n+gulp.task('clean', function () {\n+    return gulp.src(buildDir + '/*', { read: false })\n+        .pipe(clean({ force: true }));\n+});\n+\n+gulp.task('bower', function () {\n+    return bower()\n+        .pipe(gulp.dest(libDir))\n+});\n+\n+gulp.task('libs', function () {\n+    return gulp.src(libDir + '/**/*.min.js')\n+        .pipe(gulp.dest(clientLibDir));\n+});\n+\n+gulp.task('build', function (cb) {\n+    runSequence('copy-static', 'templates', 'scripts', 'css', cb);\n+});\n+\n+gulp.task('copy-static', function (cb) {\n+    runSequence('copy-html', 'copy-images', cb);\n+});\n+\n+gulp.task('copy-html', function () {\n+    return gulp.src(path.html)\n+        .pipe(gulpif(isProd, htmlmin({ collapseWhitespace: true })))\n+        .pipe(gulp.dest(clientDir))\n+        .pipe(livereload());\n+});\n+\n+gulp.task('copy-images', function () {\n+    return gulp.src(path.images)\n+        .pipe(gulp.dest(clientDir))\n+        .pipe(livereload());\n+});\n+\n+gulp.task('css', function () {\n+    return gulp.src(path.css)\n+        .pipe(concat('styles.css'))\n+        .pipe(less())\n+        .pipe(sourcemaps.init())\n+        .pipe(autoprefixer())\n+        .pipe(gulpif(isProd, cssnano()))\n+        .pipe(sourcemaps.write(cssMapDir))\n+        .pipe(gulp.dest(clientStaticDir))\n+        .pipe(livereload());\n+});\n+\n+gulp.task('templates', function () {\n+    return gulp.src(path.templates)\n+        .pipe(handlebars())\n+        .pipe(wrap('Handlebars.template(<%= contents %>)'))\n+        .pipe(declare({\n+            namespace: 'App.templates',\n+            noRedeclare: true\n+        }))\n+        .pipe(concat('templates.js'))\n+        .pipe(sourcemaps.init())\n+        .pipe(gulpif(isProd, uglify()))\n+        .pipe(sourcemaps.write(jsMapDir))\n+        .pipe(gulp.dest(clientDir))\n+        .pipe(livereload());\n+});\n+\n+gulp.task('scripts', function () {\n+    gulp.src(path.scripts)\n+        .pipe(concat('app.js'))\n+        .pipe(sourcemaps.init())\n+        .pipe(gulpif(isProd, uglify()))\n+        .pipe(sourcemaps.write(jsMapDir))\n+        .pipe(gulp.dest(clientDir))\n+        .pipe(livereload());\n+});\n+\n+gulp.task('watch', function () {\n+    livereload.listen();\n+    gulp.watch(path.scripts, ['scripts']);\n+    gulp.watch(path.templates, ['templates']);\n+    gulp.watch(path.css, ['css']);\n+    gulp.watch(path.html, ['copy-html']);\n+    gulp.watch(path.images, ['copy-images']);\n+});\n+\n+gulp.task('style', function (cb) {\n+    runSequence('style-jscs', 'style-csscomb', 'style-jshint', 'style-htmlhint', cb);\n+});\n+\n+function gitmodified() {\n+    return gitmodified0(['added', 'modified', 'untracked', 'renamed', 'copied', 'updated but unmerged']);","path":"gulpfile.js","position":136,"original_position":136,"commit_id":"cfbd052cf26c0c52fa715863c194830bdef114c2","original_commit_id":"cfbd052cf26c0c52fa715863c194830bdef114c2","user":{"login":"puzankov","id":329326,"avatar_url":"https://avatars.githubusercontent.com/u/329326?v=3","gravatar_id":"","url":"https://api.github.com/users/puzankov","html_url":"https://github.com/puzankov","followers_url":"https://api.github.com/users/puzankov/followers","following_url":"https://api.github.com/users/puzankov/following{/other_user}","gists_url":"https://api.github.com/users/puzankov/gists{/gist_id}","starred_url":"https://api.github.com/users/puzankov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puzankov/subscriptions","organizations_url":"https://api.github.com/users/puzankov/orgs","repos_url":"https://api.github.com/users/puzankov/repos","events_url":"https://api.github.com/users/puzankov/events{/privacy}","received_events_url":"https://api.github.com/users/puzankov/received_events","type":"User","site_admin":false},"body":"what is 0","created_at":"2016-02-25T14:49:15Z","updated_at":"2016-02-25T14:49:15Z","html_url":"https://github.com/taras-petushkov/adv-fe/pull/2#discussion_r54105201","pull_request_url":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/comments/54105201"},"html":{"href":"https://github.com/taras-petushkov/adv-fe/pull/2#discussion_r54105201"},"pull_request":{"href":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/2","id":60607495,"html_url":"https://github.com/taras-petushkov/adv-fe/pull/2","diff_url":"https://github.com/taras-petushkov/adv-fe/pull/2.diff","patch_url":"https://github.com/taras-petushkov/adv-fe/pull/2.patch","issue_url":"https://api.github.com/repos/taras-petushkov/adv-fe/issues/2","number":2,"state":"open","locked":false,"title":"L3 ht","user":{"login":"taras-petushkov","id":17085102,"avatar_url":"https://avatars.githubusercontent.com/u/17085102?v=3","gravatar_id":"","url":"https://api.github.com/users/taras-petushkov","html_url":"https://github.com/taras-petushkov","followers_url":"https://api.github.com/users/taras-petushkov/followers","following_url":"https://api.github.com/users/taras-petushkov/following{/other_user}","gists_url":"https://api.github.com/users/taras-petushkov/gists{/gist_id}","starred_url":"https://api.github.com/users/taras-petushkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taras-petushkov/subscriptions","organizations_url":"https://api.github.com/users/taras-petushkov/orgs","repos_url":"https://api.github.com/users/taras-petushkov/repos","events_url":"https://api.github.com/users/taras-petushkov/events{/privacy}","received_events_url":"https://api.github.com/users/taras-petushkov/received_events","type":"User","site_admin":false},"body":"see commit messages for more details","created_at":"2016-02-25T01:00:29Z","updated_at":"2016-02-25T14:49:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0fe2406ac943b45a553f3bbe7b02832ba8f9ae64","assignee":{"login":"puzankov","id":329326,"avatar_url":"https://avatars.githubusercontent.com/u/329326?v=3","gravatar_id":"","url":"https://api.github.com/users/puzankov","html_url":"https://github.com/puzankov","followers_url":"https://api.github.com/users/puzankov/followers","following_url":"https://api.github.com/users/puzankov/following{/other_user}","gists_url":"https://api.github.com/users/puzankov/gists{/gist_id}","starred_url":"https://api.github.com/users/puzankov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puzankov/subscriptions","organizations_url":"https://api.github.com/users/puzankov/orgs","repos_url":"https://api.github.com/users/puzankov/repos","events_url":"https://api.github.com/users/puzankov/events{/privacy}","received_events_url":"https://api.github.com/users/puzankov/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/2/commits","review_comments_url":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/2/comments","review_comment_url":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taras-petushkov/adv-fe/issues/2/comments","statuses_url":"https://api.github.com/repos/taras-petushkov/adv-fe/statuses/cfbd052cf26c0c52fa715863c194830bdef114c2","head":{"label":"taras-petushkov:l3-ht","ref":"l3-ht","sha":"cfbd052cf26c0c52fa715863c194830bdef114c2","user":{"login":"taras-petushkov","id":17085102,"avatar_url":"https://avatars.githubusercontent.com/u/17085102?v=3","gravatar_id":"","url":"https://api.github.com/users/taras-petushkov","html_url":"https://github.com/taras-petushkov","followers_url":"https://api.github.com/users/taras-petushkov/followers","following_url":"https://api.github.com/users/taras-petushkov/following{/other_user}","gists_url":"https://api.github.com/users/taras-petushkov/gists{/gist_id}","starred_url":"https://api.github.com/users/taras-petushkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taras-petushkov/subscriptions","organizations_url":"https://api.github.com/users/taras-petushkov/orgs","repos_url":"https://api.github.com/users/taras-petushkov/repos","events_url":"https://api.github.com/users/taras-petushkov/events{/privacy}","received_events_url":"https://api.github.com/users/taras-petushkov/received_events","type":"User","site_admin":false},"repo":{"id":51537236,"name":"adv-fe","full_name":"taras-petushkov/adv-fe","owner":{"login":"taras-petushkov","id":17085102,"avatar_url":"https://avatars.githubusercontent.com/u/17085102?v=3","gravatar_id":"","url":"https://api.github.com/users/taras-petushkov","html_url":"https://github.com/taras-petushkov","followers_url":"https://api.github.com/users/taras-petushkov/followers","following_url":"https://api.github.com/users/taras-petushkov/following{/other_user}","gists_url":"https://api.github.com/users/taras-petushkov/gists{/gist_id}","starred_url":"https://api.github.com/users/taras-petushkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taras-petushkov/subscriptions","organizations_url":"https://api.github.com/users/taras-petushkov/orgs","repos_url":"https://api.github.com/users/taras-petushkov/repos","events_url":"https://api.github.com/users/taras-petushkov/events{/privacy}","received_events_url":"https://api.github.com/users/taras-petushkov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/taras-petushkov/adv-fe","description":"Repository for Advanced Front-End Course","fork":false,"url":"https://api.github.com/repos/taras-petushkov/adv-fe","forks_url":"https://api.github.com/repos/taras-petushkov/adv-fe/forks","keys_url":"https://api.github.com/repos/taras-petushkov/adv-fe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taras-petushkov/adv-fe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taras-petushkov/adv-fe/teams","hooks_url":"https://api.github.com/repos/taras-petushkov/adv-fe/hooks","issue_events_url":"https://api.github.com/repos/taras-petushkov/adv-fe/issues/events{/number}","events_url":"https://api.github.com/repos/taras-petushkov/adv-fe/events","assignees_url":"https://api.github.com/repos/taras-petushkov/adv-fe/assignees{/user}","branches_url":"https://api.github.com/repos/taras-petushkov/adv-fe/branches{/branch}","tags_url":"https://api.github.com/repos/taras-petushkov/adv-fe/tags","blobs_url":"https://api.github.com/repos/taras-petushkov/adv-fe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taras-petushkov/adv-fe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taras-petushkov/adv-fe/git/refs{/sha}","trees_url":"https://api.github.com/repos/taras-petushkov/adv-fe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taras-petushkov/adv-fe/statuses/{sha}","languages_url":"https://api.github.com/repos/taras-petushkov/adv-fe/languages","stargazers_url":"https://api.github.com/repos/taras-petushkov/adv-fe/stargazers","contributors_url":"https://api.github.com/repos/taras-petushkov/adv-fe/contributors","subscribers_url":"https://api.github.com/repos/taras-petushkov/adv-fe/subscribers","subscription_url":"https://api.github.com/repos/taras-petushkov/adv-fe/subscription","commits_url":"https://api.github.com/repos/taras-petushkov/adv-fe/commits{/sha}","git_commits_url":"https://api.github.com/repos/taras-petushkov/adv-fe/git/commits{/sha}","comments_url":"https://api.github.com/repos/taras-petushkov/adv-fe/comments{/number}","issue_comment_url":"https://api.github.com/repos/taras-petushkov/adv-fe/issues/comments{/number}","contents_url":"https://api.github.com/repos/taras-petushkov/adv-fe/contents/{+path}","compare_url":"https://api.github.com/repos/taras-petushkov/adv-fe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taras-petushkov/adv-fe/merges","archive_url":"https://api.github.com/repos/taras-petushkov/adv-fe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taras-petushkov/adv-fe/downloads","issues_url":"https://api.github.com/repos/taras-petushkov/adv-fe/issues{/number}","pulls_url":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls{/number}","milestones_url":"https://api.github.com/repos/taras-petushkov/adv-fe/milestones{/number}","notifications_url":"https://api.github.com/repos/taras-petushkov/adv-fe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taras-petushkov/adv-fe/labels{/name}","releases_url":"https://api.github.com/repos/taras-petushkov/adv-fe/releases{/id}","deployments_url":"https://api.github.com/repos/taras-petushkov/adv-fe/deployments","created_at":"2016-02-11T18:41:39Z","updated_at":"2016-02-25T01:14:01Z","pushed_at":"2016-02-25T12:03:15Z","git_url":"git://github.com/taras-petushkov/adv-fe.git","ssh_url":"git@github.com:taras-petushkov/adv-fe.git","clone_url":"https://github.com/taras-petushkov/adv-fe.git","svn_url":"https://github.com/taras-petushkov/adv-fe","homepage":"","size":112,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"taras-petushkov:master","ref":"master","sha":"4b6e82675377a93588009969d55752eca893ac9b","user":{"login":"taras-petushkov","id":17085102,"avatar_url":"https://avatars.githubusercontent.com/u/17085102?v=3","gravatar_id":"","url":"https://api.github.com/users/taras-petushkov","html_url":"https://github.com/taras-petushkov","followers_url":"https://api.github.com/users/taras-petushkov/followers","following_url":"https://api.github.com/users/taras-petushkov/following{/other_user}","gists_url":"https://api.github.com/users/taras-petushkov/gists{/gist_id}","starred_url":"https://api.github.com/users/taras-petushkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taras-petushkov/subscriptions","organizations_url":"https://api.github.com/users/taras-petushkov/orgs","repos_url":"https://api.github.com/users/taras-petushkov/repos","events_url":"https://api.github.com/users/taras-petushkov/events{/privacy}","received_events_url":"https://api.github.com/users/taras-petushkov/received_events","type":"User","site_admin":false},"repo":{"id":51537236,"name":"adv-fe","full_name":"taras-petushkov/adv-fe","owner":{"login":"taras-petushkov","id":17085102,"avatar_url":"https://avatars.githubusercontent.com/u/17085102?v=3","gravatar_id":"","url":"https://api.github.com/users/taras-petushkov","html_url":"https://github.com/taras-petushkov","followers_url":"https://api.github.com/users/taras-petushkov/followers","following_url":"https://api.github.com/users/taras-petushkov/following{/other_user}","gists_url":"https://api.github.com/users/taras-petushkov/gists{/gist_id}","starred_url":"https://api.github.com/users/taras-petushkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taras-petushkov/subscriptions","organizations_url":"https://api.github.com/users/taras-petushkov/orgs","repos_url":"https://api.github.com/users/taras-petushkov/repos","events_url":"https://api.github.com/users/taras-petushkov/events{/privacy}","received_events_url":"https://api.github.com/users/taras-petushkov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/taras-petushkov/adv-fe","description":"Repository for Advanced Front-End Course","fork":false,"url":"https://api.github.com/repos/taras-petushkov/adv-fe","forks_url":"https://api.github.com/repos/taras-petushkov/adv-fe/forks","keys_url":"https://api.github.com/repos/taras-petushkov/adv-fe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taras-petushkov/adv-fe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taras-petushkov/adv-fe/teams","hooks_url":"https://api.github.com/repos/taras-petushkov/adv-fe/hooks","issue_events_url":"https://api.github.com/repos/taras-petushkov/adv-fe/issues/events{/number}","events_url":"https://api.github.com/repos/taras-petushkov/adv-fe/events","assignees_url":"https://api.github.com/repos/taras-petushkov/adv-fe/assignees{/user}","branches_url":"https://api.github.com/repos/taras-petushkov/adv-fe/branches{/branch}","tags_url":"https://api.github.com/repos/taras-petushkov/adv-fe/tags","blobs_url":"https://api.github.com/repos/taras-petushkov/adv-fe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taras-petushkov/adv-fe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taras-petushkov/adv-fe/git/refs{/sha}","trees_url":"https://api.github.com/repos/taras-petushkov/adv-fe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taras-petushkov/adv-fe/statuses/{sha}","languages_url":"https://api.github.com/repos/taras-petushkov/adv-fe/languages","stargazers_url":"https://api.github.com/repos/taras-petushkov/adv-fe/stargazers","contributors_url":"https://api.github.com/repos/taras-petushkov/adv-fe/contributors","subscribers_url":"https://api.github.com/repos/taras-petushkov/adv-fe/subscribers","subscription_url":"https://api.github.com/repos/taras-petushkov/adv-fe/subscription","commits_url":"https://api.github.com/repos/taras-petushkov/adv-fe/commits{/sha}","git_commits_url":"https://api.github.com/repos/taras-petushkov/adv-fe/git/commits{/sha}","comments_url":"https://api.github.com/repos/taras-petushkov/adv-fe/comments{/number}","issue_comment_url":"https://api.github.com/repos/taras-petushkov/adv-fe/issues/comments{/number}","contents_url":"https://api.github.com/repos/taras-petushkov/adv-fe/contents/{+path}","compare_url":"https://api.github.com/repos/taras-petushkov/adv-fe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taras-petushkov/adv-fe/merges","archive_url":"https://api.github.com/repos/taras-petushkov/adv-fe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taras-petushkov/adv-fe/downloads","issues_url":"https://api.github.com/repos/taras-petushkov/adv-fe/issues{/number}","pulls_url":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls{/number}","milestones_url":"https://api.github.com/repos/taras-petushkov/adv-fe/milestones{/number}","notifications_url":"https://api.github.com/repos/taras-petushkov/adv-fe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taras-petushkov/adv-fe/labels{/name}","releases_url":"https://api.github.com/repos/taras-petushkov/adv-fe/releases{/id}","deployments_url":"https://api.github.com/repos/taras-petushkov/adv-fe/deployments","created_at":"2016-02-11T18:41:39Z","updated_at":"2016-02-25T01:14:01Z","pushed_at":"2016-02-25T12:03:15Z","git_url":"git://github.com/taras-petushkov/adv-fe.git","ssh_url":"git@github.com:taras-petushkov/adv-fe.git","clone_url":"https://github.com/taras-petushkov/adv-fe.git","svn_url":"https://github.com/taras-petushkov/adv-fe","homepage":"","size":112,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/2"},"html":{"href":"https://github.com/taras-petushkov/adv-fe/pull/2"},"issue":{"href":"https://api.github.com/repos/taras-petushkov/adv-fe/issues/2"},"comments":{"href":"https://api.github.com/repos/taras-petushkov/adv-fe/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taras-petushkov/adv-fe/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/taras-petushkov/adv-fe/statuses/cfbd052cf26c0c52fa715863c194830bdef114c2"}}}}