We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37f2def commit a8b4909Copy full SHA for a8b4909
idom/client/manage.py
@@ -35,13 +35,16 @@ def web_module_exists(package_name: str) -> bool:
35
36
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
- }
+ names = []
+ for pth in WEB_MODULES_DIR.glob("**/*.js"):
+ for rel_pth in pth.relative_to(WEB_MODULES_DIR):
+ if Path("common") not in rel_pth.parents:
+ continue
+ module_path = str(rel_pth.as_posix())
+ if module_path.endswith('.js'):
45
+ module_path = module_path[:-3]
46
+ names.append(module_path)
47
+ return set(names)
48
49
50
def add_web_module(package_name: str, source: Union[Path, str]) -> str:
0 commit comments