Esempio n. 1
0
File: cupcfg.py Progetto: ccock/cup
 def create_file(cls, key, path, infos):
     template_path = cls.get_template_path(key, infos['project_root'])
     if path is None:
         target_path = cls.get_target_path(key, infos['project_root'], infos['project_name'])
     else:
         target_path = path
     content = TemplateUtils.replace(FileUtils.get_content(template_path), infos)
     FileUtils.create(target_path, content)  
Esempio n. 2
0
 def create_file(cls, key, path, infos):
     template_path = cls.get_template_path(key, infos['project_root'])
     if path is None:
         target_path = cls.get_target_path(key, infos['project_root'],
                                           infos['project_name'])
     else:
         target_path = path
     content = TemplateUtils.replace(FileUtils.get_content(template_path),
                                     infos)
     FileUtils.create(target_path, content)
Esempio n. 3
0
File: cupcfg.py Progetto: ccock/cup
    def __copy_template(cls, key, project_root):
        target = cls.__get_project_template_path(key, project_root)
        source = cls.__get_cup_template_path(key)
        FileUtils.create(target, FileUtils.get_content(source))  

        
Esempio n. 4
0
 def __copy_template(cls, key, project_root):
     target = cls.__get_project_template_path(key, project_root)
     source = cls.__get_cup_template_path(key)
     FileUtils.create(target, FileUtils.get_content(source))