Skip to content

Commit

Permalink
Add script to compare npm versions
Browse files Browse the repository at this point in the history
  • Loading branch information
gberaudo authored and tonio committed Aug 27, 2020
1 parent e13a0df commit a216b64
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions compare_packages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# This script compares the npm packages version in the Luxembourg
# project with the ones in ngeo.
# Make sure to call "npm i" in the geoportal directory before running the script.

import json

with open('./geoportal/package.json') as json_file:
lux_deps = json.load(json_file)['devDependencies']
with open('./geoportal/node_modules/ngeo/package.json') as ngeo_file:
ngeo_deps = json.load(ngeo_file)['devDependencies']
for name, version in lux_deps.items():
if name in ngeo_deps:
ngeo_version = ngeo_deps[name]
if ngeo_version != version:
print(name, version, '->', ngeo_version)

0 comments on commit a216b64

Please sign in to comment.