mdoc: markdown documentation generator

Lately I’ve been avoiding inline documentation specially because JavaScript is a very loose language and I feel that inline-docs add too much noise to the code… But since documentation is very important if you want other people to use your code or if you have a large codebase I decided to create a simple documentation generator using nodejs to parse external markdown files. I tried to find other tools but none of them had all the features I wanted so I decided to code mine.

So far it’s a little rough around the edges, code can be cleaned a lot (I coded it really fast) and it isn’t as flexible/polished as I want it to be, but it’s working fine for my current needs.

The project is on Github and repository contains some example files with comments, you can check the amd-utils documentation for a live example - amd-utils documentation uses a custom template but it’s very close to mdoc default template, only extra feature is the “specs” and “source” links (since other projects probably have a different file/folder structure).

I’m not sure when I will have time to improve it but I already added a couple feature requests to the issue tracker. Watch it, fork it and contribute! If you want to report bugs and feature requests please use the Github issue tracker.

That’s it!


js-signals v0.7.0 and CompoundSignal

Last week I released a new version of js-signals, I usually avoid creating posts at each release since I think people can simply watch the project on Github or are already following me on twitter (and I always send a twit after each release) but I added a few “advanced” features that may be useful on specific cases, that’s why I decided to create a post about it, I think some explanation may help people identify good use cases for those features.

Read more…


RequireJS plugins

One of the greatest advantages of the AMD module format over the other standards is that it supports loader plugins, which can be used to load other kinds of resources besides JavaScript, it can be a really useful feature and a nice way to abstract some simple behavior, it increases the loader flexibility a lot…

I just pushed to Github all my RequireJS plugins - if you don’t know it yet, RequireJS is an awesome script loader which can improve code organization a lot if used properly - so far I have plugins for loading images, JSON files (automatically parses JSON response), JSONP / asynchronous scripts (like Google Maps) and also script files without appending the “.js” file extension (useful for dynamic scripts). I will create new plugins as needed.

Watch the project on Github & fork it. Please use the Github issues to report bugs and also for features request.



amd-utils : modular JavaScript utilities

Last week I decided to split some of my personal JavaScript code into individual modules to provide an easy way of loading only what is really necessary and increase code reuse between multiple projects/libraries. The purpose isn’t to replace Dojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common problems that aren’t solved by most of them and to avoid using a full library when you only need a small subset of features.

The project is on github and I will keep adding new features as needed, there is still a lot of stuff to be ported from my legacy JS/PHP/AS3 code and also to be coded from scratch…
Read more…


JavaScript chaining and Trainwreck.js

source images from public domain (1, 2) and edited by Miller Medeiros

Yesterday I released a piece of code that I wrote a long time ago, it’s called trainwreck.js and it’s main purpose is to provide easy method chaining.

The main reason behind it is because a lot of people don’t really understand how chaining works and end up extending jQuery or underscore.js just to be able to use chaining…

Read more…