add output dir support, add jQuery to API