Simple javascript dependency resolution