mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Add comment about auto-generated file [ci skip]
This commit is contained in:
parent
88b0a96801
commit
8736bfc052
|
@ -1195,13 +1195,13 @@ def main(
|
|||
# fmt: on
|
||||
):
|
||||
"""Convert a jinja2 template to a JavaScript module."""
|
||||
compiler = JinjaToJS(
|
||||
template_path.parent, template_path.parts[-1], js_module_format="es6"
|
||||
)
|
||||
tpl_file = template_path.parts[-1]
|
||||
compiler = JinjaToJS(template_path.parent, tpl_file, js_module_format="es6")
|
||||
header = f"// This file was auto-generated by {__file__} based on {tpl_file}"
|
||||
result = compiler.get_output()
|
||||
if output is not None:
|
||||
with output.open("w") as f:
|
||||
f.write(result)
|
||||
f.write(f"{header}\n{result}")
|
||||
print(f"Updated {output.parts[-1]}")
|
||||
else:
|
||||
print(result)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// This file was auto-generated by jinja_to_js.py based on quickstart_training.jinja
|
||||
import jinjaToJS from "jinja-to-js";export default function templateQuickstartTraining(ctx) {
|
||||
var __result = "";
|
||||
var __tmp;
|
||||
|
|
Loading…
Reference in New Issue
Block a user