Posts Tagged ‘ javascript ’

Grunt-generate: a Grunt task to generate files from user-defined templates

Grunt task that generates files from user-defined templates. It follows the DFGIMW mantra (don’t fucking get in my way).

Continue reading


#dijonjs demo included in todomvc labs section

Last week my demo for Dijon (an IOC/DI javascript framework I created) was included in the labs section of TodoMVC, a hugely popular common learning application for JavaScript MV* frameworks.

So what does it do?

In the demo Dijon is used on top of JQuery to provide structure and dependency injection for the app. It allows you to decouple several functional units and let them work together and communicate.

Even though Dijon does not impose a typical MV* structure in any way, it allows you to easily do so w/o forcing you to use any specific paradigm.

Continue reading

A plugin for #gruntjs to run #jasmine specs: grunt-jasmine-task


This plugin is deprecated and replaced by grunt-contrib-jasmine

I wrote a plugin to run jasmine specs with grunt.
It should be stable and is available through npm.
Continue reading

#Dijonjs – An IOC/DI #javascript micro-framework inspired by #robotlegs


[update 28/04/2012]The dijon demo app was included in TodoMVC’s labs section[/update]

Dijon is an IOC and DI micro-framework for Javascript. Originally it was meant to be a port of Robotlegs, but deviated to something quite different. It remains however heavily inspired by Robotlegs, and more specifically Swiftsuspenders.

Basically it’s an object registry, that allows you to define how and when objects are instantiated, functions and handlers are called and what objects should be passed on to other objects (that’s the injection thingy).


Dijon is not v1.x yet, but it is stable to use.

Continue reading

#Demiurgejs: 3 types of Javascript inheritance


I’ve jumped into the rabbit hole and have been digging through the various types of inheritance possible in JavaScript.
Not really original, I know, but in a project I’m working on I needed to mix various types of inheritance, so I created a small utility lib to help doing just this: let objects inherit members from another object.


The lib’s called demiurge and can be found in the demiurge github repository.

It’s based on a gist I created a few days ago and already tweeted about, it can be found here.

Continue reading

#JSFSA: A Finite State Automaton in #JavaScript


JSFSA is a small javascript lib I wrote that allows for the creation of asynchronous, hierarchical, non-deterministic finite-state automata (more popularly called finite-state machines, but doesn’t ‘automaton’ sound infinitely more cool?)


  • Hierarchical states: states can be configured to have an unlimited number of substates, an unlimited number of levels deep.
  • Guards: an unlimited amount of callbacks can be set to guard both entry and exit of states.
  • Listeners: an unlimited amount of callbacks can be executed on both entry and exit of states.
  • Named transitions: switching of states happens through named transitions.
  • Asynchronous transitioning: transitioning from one state to the other can be paused/resumed.
  • Framework independent: doesn’t rely on any other 3rd party frameworks.

Continue reading

Automating JavaScript builds

Automating JavaScript builds

— UPDATE (20/04/2012) —

This is an update to my original post on how to automate javascript builds using ant and a number of other tools, however, for most of my projects I’ve switched over to gruntjs. It’s far easier to use than Ant since it uses javascript and integrates most of my build tools pretty easily. Granted, it’s a little more limited than Ant, for instance: you can’t invoke shell commands from gruntjs (except the ones that have grunt tasks).
I also wrote a gruntjs plugin for running jasmine specs: grunt-jasmine-task.

Forget Ant, use gruntjs instead. 🙂

Below is the original post, just for sake of reference, but I consider it outdated, since I no longer use Ant, but Grunt instead.

— ORIGINAL POST (14/03/2012)–


Sometimes even for smaller javascript projects it’s interesting to create an automated build process. From the moment there’s a few steps you need to take every time you want to release your application/library it’s beneficial to automate this process not only because it will save you time, but also because it will save you the headache of remembering to do every step every time.

Continue reading

%d bloggers like this: