From d6bc0b25b4a11b4b25af3c696c477490cfb286f6 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 20 Aug 2015 11:37:37 +0100 Subject: [PATCH] Created script for building firefox package file --- firefox/build-package.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/firefox/build-package.py b/firefox/build-package.py index e69de29..9bfb791 100644 --- a/firefox/build-package.py +++ b/firefox/build-package.py @@ -0,0 +1,22 @@ +import json + +with open("../package.json") as json_file: + project_package = json.load(json_file) + +with open("package.json") as json_file: + ext_package = json.load(json_file) + +switcher = { + 'name': 'title', + 'name': 'name', + 'version': 'version', + 'description': 'description', + 'author': 'author', + 'license': 'license' +} + +for key, value in enumerate(switcher): + ext_package[value] = project_package[key] + +with open('package.json', 'w') as file: + json.dump(ext_package, file) \ No newline at end of file