Moncader/JSWorkBench — pull request #8 by kuu (2012-10-12 06:42:18+00:00)
Title: This is a rework from the previous pull request.

I reverted the previous commit so that any reviewer can grasp the entire meaning of this pull request.

[Issue]
In build.json file, user can describe dependency using the 'targets' property in 'resources' section.
However, the result file would have redundancy if the targets shared the same resources.

[Cause]
There's no logic to avoid redundancy across targets.

[Fix]
Added a singleton class (utils.resourceTracker) to track processed resources.
On each build, input resources are checked for removing redundancy.