merge 'create_sub_lib' into 'check_sub_repo'; improved file/dir share js code