mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Generate html and json of supported css properties.
Outputs html and json file of supported css properties to target/doc/ directory when deploying github-pages.
This commit is contained in:
parent
803f39df19
commit
e576fe94b2
3 changed files with 83 additions and 1 deletions
|
@ -21,4 +21,17 @@ properties = dict(
|
|||
})
|
||||
for p in template.module.LONGHANDS + template.module.SHORTHANDS
|
||||
)
|
||||
print(json.dumps(properties, indent=4))
|
||||
|
||||
json_dump = json.dumps(properties, indent=4)
|
||||
|
||||
#
|
||||
# Resolve path to doc directory and write CSS properties and JSON.
|
||||
#
|
||||
servo_doc_path = os.path.abspath(os.path.join(style, '../', '../', 'target', 'doc', 'servo'))
|
||||
|
||||
with open(os.path.join(servo_doc_path, 'css-properties.json'), "w") as out_file:
|
||||
out_file.write(json_dump)
|
||||
|
||||
html_template = Template(filename=os.path.join(style, "properties.html.mako"), input_encoding='utf8')
|
||||
with open(os.path.join(servo_doc_path, 'css-properties.html'), "w") as out_file:
|
||||
out_file.write(html_template.render(properties=properties))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue