Exemplo n.º 1
0
 def resources(self):
     resources = []
     for file_path in utils.find_by_mask(self.FILE_MASK):
         res = utils.yaml_load(file_path)
         res['parent_path'] = file_path
         resources.append(res)
     return resources
Exemplo n.º 2
0
    def _get_resources_list():
        result = []
        for path in utils.find_by_mask(utils.read_config()['resources-files-mask']):
            resource = utils.yaml_load(path)
            resource['path'] = path
            resource['dir_path'] = os.path.dirname(path)
            result.append(resource)

        return result
Exemplo n.º 3
0
def compile_all():
    from solar.core.resource import compiler

    destination_path = utils.read_config()['resources-compiled-file']

    if os.path.exists(destination_path):
        os.remove(destination_path)

    for path in utils.find_by_mask(utils.read_config()['resources-files-mask']):
        meta = utils.yaml_load(path)
        meta['base_path'] = os.path.dirname(path)

        compiler.compile(meta)
Exemplo n.º 4
0
def compile_all():
    from solar.core.resource import compiler

    destination_path = utils.read_config()['resources-compiled-file']

    if os.path.exists(destination_path):
        os.remove(destination_path)

    for path in utils.find_by_mask(
            utils.read_config()['resources-files-mask']):
        meta = utils.yaml_load(path)
        meta['base_path'] = os.path.dirname(path)

        compiler.compile(meta)