Archive for March, 2012

#JSFSA: A Finite State Automaton in #JavaScript

JSFSA

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?)

Features

  • 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)–

What?

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: