Refactor the dir of js.