Skip to content

chore: Update migration and refactoring scripts#1566

Merged
willum070 merged 7 commits into
mainfrom
update-scripts
Jul 16, 2026
Merged

chore: Update migration and refactoring scripts#1566
willum070 merged 7 commits into
mainfrom
update-scripts

Conversation

@willum070

@willum070 willum070 commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator
  • DRY'd up Boilerplate Generation: Extracted the shared configuration generation (package.json, tsconfig.json, and README.md) from new-sample.sh and migrate-sample.sh into a new, executable helper script: generate-shared-boilerplate.sh. This significantly reduces duplication (removing ~140 lines of duplicate code) and provides a single source of truth for future sample boilerplate updates.
  • Revised package.json: Both new-sample.sh and migrate-sample.sh (via the new helper script) now output the updated package.json structure, which includes the author field and the revised test, start, build:vite, and preview scripts that explicitly reference ../../vite.config.js.
  • Bootloader Format: I replaced the hard-coded AIza... key in the new-sample.sh bootloader generation with the standard GOOGLE_MAPS_API_KEY placeholder.
  • Formatting/Linter Fixes:
    • Replaced the generated HTML comment (<!-- ... -->) in index.js inside migrate-sample.sh with a proper JS comment (// ...) to prevent ESLint failures.
    • Updated tsconfig.json array formatting to properly condense include: ["./*.ts"].
    • Corrected indentation spaces in the generated style.css (4 spaces instead of 2).
    • Fixed the empty tags in index.html (<body></body>) so that they pass Prettier without being reformatted.
    • Removed trailing spaces from the scripts that were adding extraneous whitespace to the generated files.

Successfully tested new-sample.sh by scaffolding a dummy sample and running build-single.sh against it, which passed all Prettier, ESLint, and CI checks.

@willum070
willum070 requested a review from chrisjshull July 16, 2026 17:12
Comment thread samples/migrate-sample.sh
@willum070
willum070 merged commit f352802 into main Jul 16, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants