allow js_dir to be disabled by setting it false