示例#1
0
def install_atom_pkgs(*pkgs):
    for pkg in pkgs:
        try:
            print(apm("install", pkg,compatible=COMPATIBILITY_MODE, production=DEV_MODE))
            print("Installed {}".format(pkg))
        except Exception as e:
            print(e)
示例#2
0
文件: apm.py 项目: phyng/run
 def stars(self):
     """ list stars packages """
     cloud_list = sh.apm('stars')
     cloud_list = re.findall(r'\[33m([0-9a-zA-Z_-]+)\x1b\[39m([^\x1b]*)[^\d]*(\d+)[^\d]*(\d+)', cloud_list.stdout)
     return cloud_list
示例#3
0
文件: apm.py 项目: phyng/run
 def list(self):
     """ list local packages """
     local_list = sh.apm('list')
     local_list = re.search(r'atom/packages[\s\S]*$', local_list.stdout).group(0)
     local_list = re.findall(r' ([0-9a-zA-Z_-]+)@([0-9\.]+)\n', local_list)
     return local_list