Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
keep order in elm-package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
stoeffel committed Oct 14, 2016
1 parent 1fc24c3 commit d77378f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions native_package_install.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env python


import collections
import argparse
import json
import os
Expand Down Expand Up @@ -85,6 +85,7 @@ def fetch_packages(vendor_dir, packages):
vendor = format_vendor_dir(vendor_dir, package['namespace'])
url = format_url(package)

print "Downloading {namespace}/{name} {version}".format(**package)
tar_file = urllib2.urlopen(url)
with open(tar_filename, 'w') as tar:
tar.write(tar_file.read())
Expand Down Expand Up @@ -172,7 +173,7 @@ def update_elm_package(vendor_dir, configs, packages):

for config in configs:
with open(config) as f:
data = json.load(f)
data = json.load(f, object_pairs_hook=collections.OrderedDict)

repository = data['repository']
source_directories = data['source-directories']
Expand Down

0 comments on commit d77378f

Please sign in to comment.