How I Configured a Blog
Thursday, September 4 2014
Over the summer I’ve been learning a lot about such project management tools and why they exist. Previously I probably would have relied on a direct CDN link to Angular in my HTML or, worse, downloaded
angular.js and included it with the rest of my committed source. But now, depending on Angular is as easy as
"angular": "~1.2.23" in my
bower.json. Essentially, all these tools serve to abstract away a project’s dependencies and provide convenient ways to upgrade or delete them if need be.
bower_components/, no less) were where they needed to be. And for someone who has never used such tools before, the amount of Googling required is astronomical; you can probably get anything done with Gulp, but first you have to find the right module and then learn how to integrate that module with your project and then pray that there isn’t an unsolved issue with it or else you’ll be screwed.
If that wasn’t enough, I also had to choose to use Gulp/Bower/RequireJS versus some other solution, like Grunt/Yeoman, or Gulp/Browserify, or ComponentJS (oh wait, I meant Duo). I had actually started using Grunt until I did a bit of Googling and realized that it was old and busted. And I was almost going to use Browserify, but it was a little too automated for my tastes — the same reason I also didn’t give Duo a whirl. Who knows, maybe next week I will. But by then there will be an even better solution, and everything I just mentioned will be outdated.
So how did I configure a blog? First I set up a directory structure like so:
app/ # Will be built and copied into sibling dist/ js/ less/ # And so on for img/, partials/, etc. bower.json index.html Gulpfile.js package.json
Then I spammed
npm install and
bower install, complained a lot, and something magically happened.
Oh, and of course I used strap. More on that later.