char/avril
(wip) why'd you have to go and make things so complicaaaaated?
git clone https://git.t4t.associates/char/avril
7325e8c
main
1use std:: convert:: Infallible ; 2 3use avril_core::{ Extension , Op , PublicModule }; 4 5pub fn init () ->Extension { 6Extension { 7name : "ext:path" , 8dependencies : & [ "ext:base" , "ext:file" , "ext:url" ], 9ops : vec! [ Op :: new ( "op_path_platform" , |(): () |{ 10Ok ::< _ , Infallible >( if cfg! ( windows) { "win32" } else { "posix" }) 11})], 12modules : const { 13& [ 14( 15"ext:path/api.js" , 16include_str! ( concat! ( env! ( "OUT_DIR" ), "/api.js" )), 17), 18( 19"ext:path/lexical.js" , 20include_str! ( concat! ( env! ( "OUT_DIR" ), "/lexical.js" )), 21), 22( 23"ext:path/urls.js" , 24include_str! ( concat! ( env! ( "OUT_DIR" ), "/urls.js" )), 25), 26PUBLIC_MODULES [ 0 ]. module , 27PUBLIC_MODULES [ 1 ]. module , 28PUBLIC_MODULES [ 2 ]. module , 29] 30}, 31entry_point : None , 32} 33} 34 35pub const PUBLIC_MODULES : & [ PublicModule ] =& [ 36 avril_core:: public_module!( "avril:path" , "ext:path" , "main" ), 37 avril_core:: public_module!( "avril:path/posix" , "ext:path" , "posix" ), 38 avril_core:: public_module!( "avril:path/win32" , "ext:path" , "win32" ), 39];