|
@@ -149,7 +149,7 @@ def compile(env, path, target):
|
|
|
|
|
|
dst = join(target, dst)
|
|
|
dst_folder, _ = split(dst)
|
|
|
-
|
|
|
+
|
|
|
makedirs(dst_folder, exist_ok=True)
|
|
|
|
|
|
template = env.get_template(join(cur_base, doc))
|
|
@@ -162,7 +162,7 @@ def init_gen(args):
|
|
|
# Load layout
|
|
|
file_loader = FileSystemLoader(args.source)
|
|
|
env = args.env = Environment(loader=file_loader)
|
|
|
-
|
|
|
+
|
|
|
# Init gobals
|
|
|
env.globals['lang'] = DEFAULT_LANG
|
|
|
|
|
@@ -217,7 +217,7 @@ def run(args):
|
|
|
|
|
|
if not args.watch:
|
|
|
return
|
|
|
-
|
|
|
+
|
|
|
print(f'watching {args.source}/*:{LANGUAGES}/*:{STATIC}/*:{ROOT}/*')
|
|
|
while True:
|
|
|
# take modification times
|
|
@@ -234,12 +234,12 @@ def run(args):
|
|
|
if source_mt != new_source_mt:
|
|
|
source_mt = new_source_mt
|
|
|
save_generate(gen_layout, args, 'recompiling layout')
|
|
|
-
|
|
|
+
|
|
|
new_root_mt = mtimes(ROOT)
|
|
|
if root_mt != new_root_mt:
|
|
|
root_mt = new_root_mt
|
|
|
save_generate(gen_root, args, 'copying root files')
|
|
|
-
|
|
|
+
|
|
|
new_static_mt = mtimes(STATIC)
|
|
|
if static_mt != new_static_mt:
|
|
|
static_mt = new_static_mt
|