Developer onboarding script#146
Open
gloskull wants to merge 2 commits into
Open
Conversation
Add local developer setup script (`setup:dev`) and onboarding docs
Contributor
|
resolve conflicts @gloskull |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Make it easy to bootstrap a local development environment with a single command and safe defaults for env files.
Ensure new contributors have a reproducible, documented flow that installs deps and runs validation checks by default.
Avoid committing sensitive local env values while providing a tracked .env.example with safe defaults.
Description
Add scripts/setup-dev.ts, a TypeScript CLI that verifies Node/npm, creates .env.example and .env.local when needed, optionally runs npm ci, and runs npm run lint and npm run test unless skip flags are provided.
Add tests/unit/setupDev.test.ts with unit coverage for default behavior and skip-flag behavior of setupDev.
Add a tracked .env.example with local-safe defaults and update .gitignore to allow committing .env.example while ignoring other .env* files.
Update package.json with a setup:dev script and document the onboarding flow in README.md with usage and skip-flag examples.
Testing
Ran npm run test -- tests/unit/setupDev.test.ts, which passed (1 test file, 2 tests).
Ran npm run lint -- scripts/setup-dev.ts tests/unit/setupDev.test.ts, which passed for the new files.
Executed npm run setup:dev -- --skip-install --skip-checks, which created .env.example and .env.local and completed successfully while skipping install/checks.
Ran the full npm run test, which exposed existing unrelated failures (3 failing tests in tests/components/AssetHeatmapLayer.test.tsx and tests/unit/keyCache.test.ts); these failures are not caused by the onboarding changes.
Closes #129