mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Generate apis.html and css-properties.json for docs as part of crates’ build scripts
… rather than as an extra step after `cargo doc`. This helps always using the correct set of CSS properties (for layout 2013 v.s. 2020).
This commit is contained in:
parent
ddb4e369dd
commit
0215d09ccb
8 changed files with 67 additions and 173 deletions
|
@ -13,7 +13,6 @@ import json
|
|||
import os
|
||||
import os.path as path
|
||||
import subprocess
|
||||
import sys
|
||||
from shutil import copytree, rmtree, copy2
|
||||
|
||||
from mach.decorators import (
|
||||
|
@ -274,18 +273,6 @@ class PostBuildCommands(CommandBase):
|
|||
for name in os.listdir(static):
|
||||
copy2(path.join(static, name), path.join(docs, name))
|
||||
|
||||
build = path.join(self.context.topdir, "components", "style", "properties", "build.py")
|
||||
if "layout-2020" in features:
|
||||
engine = "servo-2020"
|
||||
if "layout-2013" in features:
|
||||
engine = "servo-2013"
|
||||
subprocess.check_call([sys.executable, build, engine, "html"])
|
||||
|
||||
script = path.join(self.context.topdir, "components", "script")
|
||||
subprocess.check_call(["cmake", "."], cwd=script)
|
||||
subprocess.check_call(["cmake", "--build", ".", "--target", "supported-apis"], cwd=script)
|
||||
copy2(path.join(script, "apis.html"), path.join(docs, "servo", "apis.html"))
|
||||
|
||||
@Command('browse-doc',
|
||||
description='Generate documentation and open it in a web browser',
|
||||
category='post-build')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue