Updated new_source tool to respect a modules set C++ namespace. Fixed generation of modules with templates without config.json.
This commit is contained in:
@@ -43,6 +43,16 @@ def get_project_config() -> dict:
|
||||
raw = exec_get_output(('scons', '-s', '--disable_auto_update', '--dump=config', '--dump_format=json'))
|
||||
return json.loads(raw)
|
||||
|
||||
def get_module_config() -> dict:
|
||||
raw = exec_get_output(('scons', '-s', '--disable_auto_update', '--dump=modules', '--dump_format=json'))
|
||||
return json.loads(raw)
|
||||
|
||||
def find_module_folder(subpath: Path) -> Optional[Path]:
|
||||
for parent in subpath.parents:
|
||||
if (parent / 'SModule').exists():
|
||||
return parent
|
||||
return None
|
||||
|
||||
def prompt(prefix: str = '> ') -> str:
|
||||
sys.stdout.write(prefix)
|
||||
sys.stdout.flush()
|
||||
|
||||
Reference in New Issue
Block a user