Build Run Script

Ensures `package.json` scripts for dev, build, preview, lint, test, and format are present and validates environment variable usage before running. Use when this capability is needed.

tomevault-io 521c5db 2 files · 1.9 KB Updated

File contents

Build & Run Script

When to use this skill

  • Use when bootstrapping the project's package.json scripts or when validating build-time env variables.
  • Triggered by requests to add/update dev, build, preview, or helper scripts.

Instructions

  1. First Step: Ensure package.json contains scripts:
  • dev: vite
  • build: vite build
  • preview: vite preview --port 4173
  • lint, test, format helpers as needed.
  1. Second Step: Add a script start:ci if CI needs to build and run a static server (e.g., serve -s dist).

  2. Third Step: Validate that required VITE_ variables are documented and, optionally, verified at runtime with a small pre-flight check.

Examples

  • npm run dev to start local dev server; npm run build && npm run preview to test production output locally.

Notes

  • Encourage cross-env or platform-neutral approaches when setting env vars in scripts.

Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/cargdev--endorsment--build-run-script commit 521c5db1ef

Frequently asked questions

npx skillmds@latest add tomevault-io/build-run-script