{"id":594,"date":"2014-11-09T22:30:50","date_gmt":"2014-11-10T04:30:50","guid":{"rendered":"http:\/\/www.crccheck.com\/blog\/?p=594"},"modified":"2015-10-11T22:22:02","modified_gmt":"2015-10-12T04:22:02","slug":"demo-fuckin-a","status":"publish","type":"post","link":"https:\/\/www.crccheck.com\/blog\/demo-fuckin-a\/","title":{"rendered":"Demo: Fuckin A"},"content":{"rendered":"<p>I&#8217;ve been learning <a href=\"http:\/\/www.ansible.com\/\" target=\"_blank\">Ansible<\/a> off and on and off for the past year. I have so many complaints, but I still think it&#8217;s the least worst provisioning system out there.<\/p>\n<p>It&#8217;s online at <a href=\"http:\/\/crccheck.github.io\/fuckingansible\/\">crccheck.github.io\/fuckingansible\/<\/a>, but I&#8217;ve also embedded it below:<\/p>\n<p><iframe loading=\"lazy\" src=\"http:\/\/crccheck.github.io\/fuckingansible\/\" width=\"100%\" height=\"500\" frameborder=\"0\"><\/iframe><\/p>\n<p>I&#8217;d go more into Ansible, just just thinking about it make me so angry. So instead, I want to go over some of the new (JavaScript) things I learned working on this project.<\/p>\n<h2>LibSass<\/h2>\n<p>I&#8217;ve converted some projects from Sass to LibSass before, but this is the first time I used LibSass from the start. Not having to mess with a Gemfile and Bundler is so freeing. It&#8217;s too bad there are still so many bugs in the libsass, node-sass, grunt-sass chain. They finally fixed sass2scss in the summer, I think Sass maps are still messed up. Despite this, I would definitely go with LibSass first.<\/p>\n<h2>Grunt-Connect<\/h2>\n<p>This is the first project I&#8217;ve used `grunt-contrib-connect`. Prior, I would have just used `python -m SimpleHTTPServer`. What I like about using Connect is how it integrates with Grunt, and how I have better control over LiveReload without having to remember to enable my LiveReload browser extensions.<\/p>\n<h2>Browserify<\/h2>\n<p>I&#8217;ve experimented with Browserify before with <a href=\"http:\/\/www.lazycolor.com\/\" target=\"_blank\">lazycolor.com<\/a>, where I had previously experimented with RequireJS and r.js. I was <em>very<\/em> happy with my experience with it for this project:<\/p>\n<ol>\n<li>It found my node modules automagically. I didn&#8217;t know it did that. I just tried it and it worked.<\/li>\n<li>It made <a href=\"https:\/\/github.com\/crccheck\/fuckingansible\/blob\/master\/test\/fuckinga_test.js\" target=\"_blank\">writing JavaScript tests<\/a> so much easier. I did something similar with <a href=\"https:\/\/github.com\/crccheck\/text-mix.js\/blob\/master\/text-mix.tests.js\" target=\"_blank\">text-mix<\/a>, but that used Mocha, and I did not have a pleasant experience setting that up. Seriously, why are there so many Grunt\/Mocha plugins? And why do so many of them just not work? This time, I used Nodeunit, which was available as a Grunt contrib plugin and a breeze to set up.<\/li>\n<\/ol>\n<p>If you don&#8217;t need a DOM, writing simple assertion tests is definitely the way to go. If it&#8217;s faster to write tests, you&#8217;re more likely to write them. And best of all, since Browserify runs in an IIFE, it doesn&#8217;t put `module` or `define` into the global scope and mess up everything.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been learning Ansible off and on and off for the past year. I have so many complaints, but I still think it&#8217;s the least worst provisioning system out there. It&#8217;s online at crccheck.github.io\/fuckingansible\/, but I&#8217;ve also embedded it below: I&#8217;d go more into Ansible, just just thinking about it make me so angry. So&hellip;<\/p>\n <a href=\"https:\/\/www.crccheck.com\/blog\/demo-fuckin-a\/\" title=\"Demo: Fuckin A\" class=\"entry-more-link\"><span>Read More<\/span> <span class=\"screen-reader-text\">Demo: Fuckin A<\/span><\/a>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[5,4],"tags":[72,12],"class_list":["entry","author-showmewhatyougot","post-594","post","type-post","status-publish","format-standard","category-drafts","category-technical","tag-ansible","tag-js"],"_links":{"self":[{"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/posts\/594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/comments?post=594"}],"version-history":[{"count":5,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/posts\/594\/revisions"}],"predecessor-version":[{"id":602,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/posts\/594\/revisions\/602"}],"wp:attachment":[{"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/media?parent=594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/categories?post=594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.crccheck.com\/blog\/wp-json\/wp\/v2\/tags?post=594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}