Update: If you’re starting a fresh project with Express it’s much easier to just run express --ejs
. That will scaffold out an Express app for you with EJS ready to go!
Here’s a quick explanation of how to use EJS instead of Jade in your Express projects. This is super easy and covered well in the documentation but I wanted to put it here since that’s what I worked on today :)
Today’s post is meant to scratch an itch I had the other day regarding templates. My friend wanted to load an underscore template along with some JSON data but wasn’t sure what the best approach would be.
Continuing from yesterday’s post I’m going to start to incorporate Backbone into my BDD setup. I’m going to use the Backbone Boilerplate and grunt-bbb to setup a new project. If you’re new to the boilerplate or grunt-bbb checkout my previous post on getting started.
After a bit of a rocky start yesterday I’ve finally got Mocha and Chai running in the browser which is great. Today I’d like to test out some of the async functionality of Mocha. This seems to be the big selling point for most people so we’ll kick the tires a bit.
Since I was previously doing so much RSpec I want to try to bring some of that over to my JavaScript work. Lately I’ve been working with the Backbone Boilerplate which is a wonderful jump-start for folks who want to get up and running with AMD and Backbone. Today I’m going to see if I can get a working BDD setup going which will run some very basic tests. In a future post I’ll use this new setup to do some BDD with Backbone Boilerplate.
This is going to be a bit of lightening post because it’s rather late and I need to get to bed. I spent most of the day either eating dim sum or hanging out at the SF Creative Coders BBQ so I’ve neglected my blogging duties a bit.
I have something which will hopefully be useful for some folks who are getting into CSS3 animations with the Gfx plugin for jQuery. I’ve blogged a bit about Gfx before and one of the first things I noticed was the lack of a built in easing library. Coming from the Flash world where TweenLite is king I’ve grown very accustomed to using Robert Penner’s easing equations for great effect. The same equations are used by the jQuery framework to do its animations. Thankfully Matthew Lein was kind enough to convert those over to cubic-beziers for those of us doing CSS3 animations. Since Gfx accepts cubic-beziers I moved the equations from Matthew’s tool into an AMD compliant module and put it up on Github. It’s very simple so if AMD isn’t your thing you can just rip those parts out :D