File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ extern crate wasm_bindgen_webidl;
4
4
5
5
use failure:: ResultExt ;
6
6
use std:: env;
7
+ use std:: ffi:: OsStr ;
7
8
use std:: fs;
8
9
use std:: io:: Write ;
9
10
use std:: path;
@@ -28,12 +29,14 @@ fn try_main() -> Result<(), failure::Error> {
28
29
29
30
let mut contents = String :: new ( ) ;
30
31
for entry in entries {
31
- let entry = entry. context ( "getting webidls/enabled/* entry" ) ?;
32
- println ! ( "cargo:rerun-if-changed={}" , entry. path( ) . display( ) ) ;
32
+ let entry = entry. context ( "getting webidls/enabled/*.webidl entry" ) ?;
33
+ if entry. path ( ) . extension ( ) == Some ( OsStr :: new ( "webidl" ) ) {
34
+ println ! ( "cargo:rerun-if-changed={}" , entry. path( ) . display( ) ) ;
33
35
34
- let this_contents =
35
- fs:: read_to_string ( entry. path ( ) ) . context ( "reading WebIDL file contents" ) ?;
36
- contents. push_str ( & this_contents) ;
36
+ let this_contents =
37
+ fs:: read_to_string ( entry. path ( ) ) . context ( "reading WebIDL file contents" ) ?;
38
+ contents. push_str ( & this_contents) ;
39
+ }
37
40
}
38
41
39
42
let bindings = wasm_bindgen_webidl:: compile ( & contents)
You can’t perform that action at this time.
0 commit comments