atlantis
atlantis copied to clipboard
chore(docx): improve generateDocs script to run only for updated components with -t/--touched flag
Motivations
- Make the docs generator quieter and easier to operate, while keeping behavior consistent with the target branch.
- Improve path stability in generated JSON and avoid unnecessary work when requested.
Changes
Added
-
-t/--touchedmode: only write outputs when the source is newer than the existing JSON (mtime-based skip). - Unknown flag guard: fail fast on invalid flags with a short usage message.
Changed
- Parse using a relative path so JSON
filePathentries remain stable and relative. - Resolve base directories via
__dirname/fileURLToPathand build paths viapath.join. - DRY generation flow with a small
generate()helper reused for web, native, and V2 auto-detect. - Reduce noisy per-item logs; print a concise end-of-run summary (parsed/updated/skipped) and list updated files.
Removed
- Autocomplete V2 special-case (now covered by the generic V2 auto-detection).
- Content-diff write logic (default runs always write; touched mode controls skipping via mtime).
Fixed
- Stable
filePathvalues in generated JSON by parsing via a relative path.
Security
- n/a
Testing
- From
packages/site, runnpm run generate.- Expect all JSONs to be regenerated and a concise summary printed at the end.
- Run
npm run generate -- -t.- Expect only stale outputs to be written; summary should show a non-zero Skipped count if nothing changed.
- Run
npm run generate -- -g.- Expect an error about unknown flags with usage instructions.
Deploying atlantis with Â
 Cloudflare Pages
| Latest commit: |
85646ff
|
| Status: |  ✅ Deploy successful! |
| Preview URL: | https://6612e8ae.atlantis.pages.dev |
| Branch Preview URL: | https://cleanup-improve-generatedocs.atlantis.pages.dev |