Copy static files only

Signed-off-by: Johan Stokking <johan@stokking.nl>
pull/4804/head
Johan Stokking 2017-07-24 20:39:28 +02:00
parent d5108e5a7a
commit b0f5b3d768
2 changed files with 6 additions and 5 deletions

View File

@ -351,8 +351,8 @@ def export_project(src_paths, export_path, target, ide, libraries_paths=None,
else: else:
zip_export(zip_proj, name, resource_dict, files, inc_repos) zip_export(zip_proj, name, resource_dict, files, inc_repos)
else: else:
for exported in files: for static_file in exporter.static_files:
if not exists(join(export_path, basename(exported))): if not exists(join(export_path, basename(static_file))):
copyfile(exported, join(export_path, basename(exported))) copyfile(static_file, join(export_path, basename(static_file)))
return exporter return exporter

View File

@ -60,7 +60,8 @@ class Exporter(object):
jinja_loader = FileSystemLoader(os.path.dirname(os.path.abspath(__file__))) jinja_loader = FileSystemLoader(os.path.dirname(os.path.abspath(__file__)))
self.jinja_environment = Environment(loader=jinja_loader) self.jinja_environment = Environment(loader=jinja_loader)
self.resources = resources self.resources = resources
self.generated_files = [join(self.TEMPLATE_DIR, "GettingStarted.html"), self.generated_files = []
self.static_files = [join(self.TEMPLATE_DIR, "GettingStarted.html"),
join(self.TEMPLATE_DIR, ".mbed")] join(self.TEMPLATE_DIR, ".mbed")]
self.builder_files_dict = {} self.builder_files_dict = {}
self.add_config() self.add_config()