From 8e2af4cf056109426bed9c3eb6a8622947a28084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jussi=20R=C3=A4s=C3=A4nen?= Date: Mon, 28 Mar 2016 16:19:05 +0300 Subject: [PATCH] Fixed script to output the JSON and create doc directory. --- components/style/list_properties.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/style/list_properties.py b/components/style/list_properties.py index 671196167c9..a56c0141c76 100644 --- a/components/style/list_properties.py +++ b/components/style/list_properties.py @@ -23,12 +23,17 @@ properties = dict( ) 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)