2012.01.03

Node.js as a build script

There are a lot of build tools that covers specific use cases and/or try to cover as many scenarios as possible, amongst the most famous ones are make, rake, Ant and maven. I’m going to talk about why I’ve been favoring plain Node.js scripts as my “build tool” and how to do some simple things. This work flow may not be the best one for you and your team, understand the reasoning behind it and pick the tools based on your needs and preferences.

Read more…


2011.11.27

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!


2011.10.06

statline : Improved Vim statusline

I switched to Vim a few months ago and been reading other peoples’ settings and trying to customize it to my needs since then. Yesterday I couldn’t sleep so I decided to write my first simple “plugin” (not really a plugin, just a few settings..), it adds some cool/useful features to the vim statusline.

Here is a basic screenshot:

One of the advantages is that it adapts to the color scheme without needing any extra settings (but you can customize it easily if needed). The source code have enough comments and is split into individual blocks making it easy to add/remove things if you need. It also checks for trailing white spaces and mixed indention. (optional)

For more info check the project repository on Github and read the documentation. Please report bugs and feature requests though github issues.

That’s it!


2011.08.18

Convert YUI Test to Jasmine

I decided to port some of my old YUI Test tests to Jasmine yesterday (specifically JS-Signals and Crossroads.js tests) and realized that a big part of the process could be automated by using simple regular expressions, so I decided to create a tool to help me.

The main reason for switching from YUI Test to Jasmine was that I wanted to run the tests on node.js and also to be able to run the tests without needing an internet connection… Another reason for the switch is because I like Jasmine syntax and I think that the simple fact of describing what you want the code to do makes you think about possible edge cases.

I coded the tool very quickly just to help me on the bureaucratic process… It doesn’t do any magic but can help you to speed up the process.

You can use the tool online at: http://millermedeiros.github.com/YUI_to_Jasmine/.

Maybe it is useful to somebody else…

That’s it!


2010.04.03

Converting SVG to FIVe3D, Flash Vector Graphics and HTML5 canvas

3d vector tiger

This post is being delayed forever since I was planning to improve my SVG parser but finally I decided to release it since I don’t have plans to work on it anymore.. the basic functionalities are working since July 2009 and I abandoned the project for a while just going back to it a couple months ago when I finally decided to fix a few bugs and add the option to export HTML5 Canvas and Flash AS3 drawing commands… so let’s explain how it all started.
Read more…