mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto-generate CSSStyleDeclaration.webidl for CSS properties based on the style crate
This commit is contained in:
parent
447ae1eae6
commit
f1300bb98b
7 changed files with 83 additions and 485 deletions
|
@ -15,6 +15,13 @@ use std::time::Instant;
|
|||
fn main() {
|
||||
let start = Instant::now();
|
||||
|
||||
let style_out_dir = PathBuf::from(env::var_os("DEP_SERVO_STYLE_CRATE_OUT_DIR").unwrap());
|
||||
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
|
||||
let build_dir = out_dir.join("build");
|
||||
let json = "css_properties.json";
|
||||
let _ = std::fs::create_dir(&build_dir); // Ignore errors: they most likely indicate it already exists
|
||||
std::fs::copy(style_out_dir.join(json), build_dir.join(json)).unwrap();
|
||||
|
||||
// This must use the Ninja generator -- it's the only one that
|
||||
// parallelizes cmake's output properly. (Cmake generates
|
||||
// separate makefiles, each of which try to build
|
||||
|
@ -35,7 +42,7 @@ fn main() {
|
|||
start.elapsed().as_secs()
|
||||
);
|
||||
|
||||
let json = PathBuf::from(env::var_os("OUT_DIR").unwrap())
|
||||
let json = out_dir
|
||||
.join("build")
|
||||
.join("InterfaceObjectMapData.json");
|
||||
let json: Value = serde_json::from_reader(File::open(&json).unwrap()).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue