mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Fixed script to output the JSON and create doc directory.
This commit is contained in:
parent
dbb5d11dd3
commit
8e2af4cf05
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue