diff --git a/plugins/axiomcode/skills/axiomcode/scripts/ax_fresh.py b/plugins/axiomcode/skills/axiomcode/scripts/ax_fresh.py index 896f104bd..808b4a3cb 100644 --- a/plugins/axiomcode/skills/axiomcode/scripts/ax_fresh.py +++ b/plugins/axiomcode/skills/axiomcode/scripts/ax_fresh.py @@ -42,10 +42,16 @@ # what each language's parser reads: extensions, and file names read whatever their extension. Mirrors # parser/src/extract.ts: Java also reads .properties / XML / YAML / Gradle / lombok.config and # META-INF/services; TypeScript reads JavaScript beside it and resolves through tsconfig and package.json. +# SINGLE-FILE COMPONENTS (#1744): the web front ends read the \n" + "{{ lazyHelper() }}\n"), + ('src/List.svelte', '\n'), ('src/pages/index.astro', '---\n---\n'), + ('src/index.html', '
\n'), ('src/app.css', 'a {}\n'), ('README.md', '# x\n')): + write(root, f, body) + got = {os.path.relpath(p, root) for p in ax_fresh.watched(root, lang)} + check(f"prune: {lang} watches .vue, .svelte and .astro components, not the .html, .css or .md beside them", + got == {'src/lib.js', 'src/views/Home.vue', 'src/List.svelte', 'src/pages/index.astro'}, sorted(got)) + table = dict(lang=lang, lang_auto=True, src='', files=ax_fresh.snapshot(root, lang, root)) + with open(os.path.join(root, 'src/views/Home.vue'), 'w') as fh: + fh.write("\n" + "{{ lazyHelper() }}{{ newHelper() }}\n") + write(root, 'src/views/About.vue', '\n') + write(root, 'src/index.html', '