This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
2015-08-20 11:37:37 +01:00
|
|
|
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)
|