Skip to content

Commit

Permalink
Fixed script to output the JSON and create doc directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasanen committed Mar 28, 2016
1 parent dbb5d11 commit 8e2af4c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/style/list_properties.py
Expand Up @@ -23,12 +23,17 @@
)

json_dump = json.dumps(properties, indent=4)
print(json_dump)

#
# Resolve path to doc directory and write CSS properties and JSON.
#
servo_doc_path = os.path.abspath(os.path.join(style, '../', '../', 'target', 'doc', 'servo'))

# Ensure ./target/doc/servo exists
if not os.path.exists(servo_doc_path):
os.makedirs(servo_doc_path)

with open(os.path.join(servo_doc_path, 'css-properties.json'), "w") as out_file:
out_file.write(json_dump)

Expand Down

0 comments on commit 8e2af4c

Please sign in to comment.