コード例 #1
0
ファイル: cupcfg.py プロジェクト: 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)  
コード例 #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)
コード例 #3
0
ファイル: cupcfg.py プロジェクト: 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))  

        
コード例 #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))