mirror of https://github.com/explosion/spaCy.git
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
|
# fmt: on
|
||||||
):
|
):
|
||||||
"""Convert a jinja2 template to a JavaScript module."""
|
"""Convert a jinja2 template to a JavaScript module."""
|
||||||
compiler = JinjaToJS(
|
tpl_file = template_path.parts[-1]
|
||||||
template_path.parent, template_path.parts[-1], js_module_format="es6"
|
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()
|
result = compiler.get_output()
|
||||||
if output is not None:
|
if output is not None:
|
||||||
with output.open("w") as f:
|
with output.open("w") as f:
|
||||||
f.write(result)
|
f.write(f"{header}\n{result}")
|
||||||
print(f"Updated {output.parts[-1]}")
|
print(f"Updated {output.parts[-1]}")
|
||||||
else:
|
else:
|
||||||
print(result)
|
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) {
|
import jinjaToJS from "jinja-to-js";export default function templateQuickstartTraining(ctx) {
|
||||||
var __result = "";
|
var __result = "";
|
||||||
var __tmp;
|
var __tmp;
|
||||||
|
|
Loading…
Reference in New Issue