MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / rebuild_project

Method rebuild_project

class/projectModel/nodejsModel.py:711–724  ·  view source on GitHub ↗

@name 重新构建指定项目 @author hwliang<2021-08-26> @param project_name: string<项目名称> @return bool

(self,project_name)

Source from the content-addressed store, hash-verified

709 return public.return_data(True,'修改项目成功')
710
711 def rebuild_project(self,project_name):
712 ''&#x27;
713 @name 重新构建指定项目
714 @author hwliang<2021-08-26>
715 @param project_name: string<项目名称>
716 @return bool
717 ''&#x27;
718 project_find = self.get_project_find(project_name)
719 if not project_find: return False
720 nodejs_version = project_find['project_config']['nodejs_version']
721 npm_bin = self.get_npm_bin(nodejs_version)
722
723 public.ExecShell(self.get_last_env(nodejs_version) + "cd {} && {} rebuild &>> {}".format(project_find['path'],npm_bin,self._npm_exec_log))
724 return True
725
726
727 def remove_project(self,get):

Callers 3

modify_projectMethod · 0.95
install_packagesMethod · 0.95
modify_projectMethod · 0.95

Calls 5

get_project_findMethod · 0.95
get_npm_binMethod · 0.95
get_last_envMethod · 0.95
ExecShellMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected