If you want to test local Browserify modules in your project with Karma, you'll have to take an extra step. One solution is to use karma-browserify that bundles your modules with your tests, but it has downfalls requiring files that require other files. That really sucks since we'll often be unit testing local modules that depend on at least one other module, and thus it'd only be useful for like requiring simple NPM modules.

Another solution uses Gulp to manually build a test bundle and put it on the project JS root path such that local modules can be resolved.


Browserify and Gulp Workflow for React

The JS world moves quickly. New web tools are adopted faster than new Spidermans (men?) are produced. One second, people are talking about AngularJS, RequireJS, and Grunt. The next, it's React, Browserify, and Gulp. Who knows, by tomorrow we could have some new shiny things called McRib, Modulus, or Chug. But the new workflows that come along never fail to keep development interesting and never fail to make our lives easier. Kay, it's time to freshen up. Let us answer: what is so streets-ahead about these new web technologies?


For the last month and a half, I worked in a small team of about three other developers and two engineering managers to make our FirefoxOS app store, the Firefox Marketplace, fast and performant enough to run on our upcoming $25 smartphone. We were targetting a phone that would run on slower 2G connections, on lower memory, and with lower CPU. After an initial lessons-learned prototype that we did not end up shipping due to deadline pushes, we ended up forking our current app store into a separate project, Yogafire. This is how we made it fast.


ng-okevin's Angular ch.1 - AngularJS

Welcome to my five-part introduction to AngularJS! Because I was dissatisfied with the incoherency of the official AngularJS docs. I started writing this AngularJS guide on weekends during my senior year in college. But since starting full-time at Mozilla, my motivation and energy waned. So I am publishing it on my blog for the good of The Web!

This introduction comes complete with live demos and open-sourced examples.


ng-okevin's Angular ch.2 - Scopes

Angular scopes are objects that gives us access to the model. Remember the model holds the data and state of an MVC application. Besides applying context against which expressions are evaluated, scopes allow us to:

  • access and manipulate the model.
  • set event listeners to watch for whenever the model changes.
  • enlighten Angular about asynchronous changes to the model.