File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,16 @@ def web_module_exists(package_name: str) -> bool:
35
35
36
36
37
37
def web_module_names () -> Set [str ]:
38
- return {
39
- str (rel_pth .as_posix ()).rstrip (".js" )
40
- for rel_pth in (
41
- pth .relative_to (WEB_MODULES_DIR ) for pth in WEB_MODULES_DIR .glob ("**/*.js" )
42
- )
43
- if Path ("common" ) not in rel_pth .parents
44
- }
38
+ names = []
39
+ for pth in WEB_MODULES_DIR .glob ("**/*.js" ):
40
+ for rel_pth in pth .relative_to (WEB_MODULES_DIR ):
41
+ if Path ("common" ) not in rel_pth .parents :
42
+ continue
43
+ module_path = str (rel_pth .as_posix ())
44
+ if module_path .endswith ('.js' ):
45
+ module_path = module_path [:- 3 ]
46
+ names .append (module_path )
47
+ return set (names )
45
48
46
49
47
50
def add_web_module (package_name : str , source : Union [Path , str ]) -> str :
You can’t perform that action at this time.
0 commit comments