GitHub PullRequestReviewCommentEvent at 2014-04-23 04:31:16
Repository: component-hint
Actor: ronkorving
Payload: {"comment":{"url":"https://api.github.com/repos/Wizcorp/component-hint/pulls/comments/11886552","id":11886552,"diff_hunk":"@@ -0,0 +1,46 @@\n+var fs = require('fs');\n+var path = require('path');\n+var async = require('async');\n+\n+\n+/**\n+ * This test will run on the fly and checks each file type within the component.json file for it's\n+ * existance.\n+ * \n+ * @param {Object} componentData\n+ * @param {Object} componentHint\n+ * @param {Function} cb\n+ * @returns {undefined}\n+ */\n+exports.onTheFlyTest = function (componentData, componentHint, cb) {\n+\tvar componentPath = componentData.path;\n+\tvar eventChannel = componentData.channel;\n+\n+\tvar fileList = {\n+\t\tscripts: componentData.json.scripts || ['./index.js'],\n+\t\tstyles: componentData.json.styles || [],\n+\t\tjson: componentData.json.json || [],\n+\t\timages: componentData.json.images || [],\n+\t\tfonts: componentData.json.fonts || [],\n+\t\tfiles: componentData.json.files || [],\n+\t\ttemplates: componentData.json.templates || []\n+\t};\n+\n+\tasync.each(Object.keys(fileList), function (fileType, fileTypeCb) {\n+\t\tvar files = fileList[fileType];\n+\n+\t\tasync.each(files, function (fileName, callback) {\n+\t\t\tvar fullFileName = path.resolve(componentPath, fileName);\n+\n+\t\t\tfs.stat(fullFileName, function (error, stats) {","path":"lib/tests/101_checkFilesExist.js","position":35,"original_position":35,"commit_id":"3039c369468156dbd694c4ba89a2d7bdb027427c","original_commit_id":"e05343539d87aeb1bd653f9c869564046a5628b6","user":{"login":"ronkorving","id":631240,"avatar_url":"https://avatars.githubusercontent.com/u/631240?","gravatar_id":"283fd5cc523bc957e48597425c82c5e4","url":"https://api.github.com/users/ronkorving","html_url":"https://github.com/ronkorving","followers_url":"https://api.github.com/users/ronkorving/followers","following_url":"https://api.github.com/users/ronkorving/following{/other_user}","gists_url":"https://api.github.com/users/ronkorving/gists{/gist_id}","starred_url":"https://api.github.com/users/ronkorving/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ronkorving/subscriptions","organizations_url":"https://api.github.com/users/ronkorving/orgs","repos_url":"https://api.github.com/users/ronkorving/repos","events_url":"https://api.github.com/users/ronkorving/events{/privacy}","received_events_url":"https://api.github.com/users/ronkorving/received_events","type":"User","site_admin":false},"body":"Why not use fs.exists?","created_at":"2014-04-23T04:31:16Z","updated_at":"2014-04-23T04:31:16Z","html_url":"https://github.com/Wizcorp/component-hint/pull/33#discussion_r11886552","pull_request_url":"https://api.github.com/repos/Wizcorp/component-hint/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/Wizcorp/component-hint/pulls/comments/11886552"},"html":{"href":"https://github.com/Wizcorp/component-hint/pull/33#discussion_r11886552"},"pull_request":{"href":"https://api.github.com/repos/Wizcorp/component-hint/pulls/33"}}}}