{"id":1156,"date":"2016-05-06T09:11:27","date_gmt":"2016-05-06T08:11:27","guid":{"rendered":"http:\/\/martinjoiner.co.uk\/blog\/?p=1156"},"modified":"2016-05-06T10:33:07","modified_gmt":"2016-05-06T09:33:07","slug":"run-build-tasks-inside-your-vm-or-on-the-host","status":"publish","type":"post","link":"https:\/\/martinjoiner.co.uk\/blog\/2016\/05\/06\/run-build-tasks-inside-your-vm-or-on-the-host\/","title":{"rendered":"Run build tasks inside your VM or on the host?"},"content":{"rendered":"<p>I build websites working on a Windows (or Mac for some clients) computer\u00a0with a Linux virtual machine (spun up by Vagrant) running inside that contains the actual website files. Most web developers do something like this. But until last week I hadn't thought of <em>running<\/em> my NodeJS dev build tasks such as Grunt and Gulp in any environment other than the Linux VM itself.<\/p>\n<p>Despite the fact I <em>know<\/em> NodeJS installs really easily in Windows (and Mac) and I <em>know<\/em> the big \"real-world\" machine will always be better resourced to run tasks than the \"fake\" computer that is the VM, and I <em>know<\/em> the drive is mounted for perfect reading and writing by the host machine and I <em>know<\/em> build tasks only need to be run during development and never on the production server. Despite <em>all that --<\/em>\u00a0for some reason -- I just always kept my head inside the VM when thinking about build tasks.<\/p>\n<p>So now (with NodeJS installed on my Windows machine) I whip up PowerShell, navigate to the directory of the VM's mounted drive and run the 'gulp' command... Voila! Now the host machine -- with it's abundance of resources -- is doing the heavy(ish) lifting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I build websites working on a Windows (or Mac for some clients) computer\u00a0with a Linux virtual machine (spun up by Vagrant) running inside that contains the actual website files. Most web developers do something like this. But until last week I hadn&#8217;t thought of running my NodeJS dev build tasks such as Grunt and Gulp [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75],"tags":[123,120,121,122],"class_list":["post-1156","post","type-post","status-publish","format-standard","hentry","category-software","tag-front-end","tag-grunt","tag-gulp","tag-nodejs"],"_links":{"self":[{"href":"https:\/\/martinjoiner.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/martinjoiner.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/martinjoiner.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/martinjoiner.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/martinjoiner.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=1156"}],"version-history":[{"count":2,"href":"https:\/\/martinjoiner.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1156\/revisions"}],"predecessor-version":[{"id":1159,"href":"https:\/\/martinjoiner.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1156\/revisions\/1159"}],"wp:attachment":[{"href":"https:\/\/martinjoiner.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/martinjoiner.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/martinjoiner.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}