Documentation
¶
Overview ¶
Package build provides build-command resolution and execution for Atlas.
Index ¶
- func ResolveBuildCommand(framework, packageManager string) (string, []string, error)
- func ResolvePublishDir(framework, packageManager, workspaceRoot string) (string, error)
- func ResolvePythonBinary(workspaceRoot, binName string) string
- func ResolveTestCommand(framework, packageManager string) (string, []string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveBuildCommand ¶
ResolveBuildCommand returns the command and arguments to build the project based on its detected framework and package manager. This is a pure function — no exec calls, no I/O, instantly testable.
Supported combinations:
nextjs / react + pnpm → pnpm build nextjs / react + yarn → yarn build nextjs / react + npm/"" → npm run build go → go build ./...
func ResolvePublishDir ¶
ResolvePublishDir heuristic-matches the build output directory for static hosting. Examples:
- react + vite.config.ts -> dist
- react + CRA -> build
- nextjs -> out (requires static export)
- go -> error (Netlify only serves static files)
func ResolvePythonBinary ¶
ResolvePythonBinary returns the path to a python or pip binary inside the local virtual env if it exists, or falls back to the global binary name.
func ResolveTestCommand ¶
ResolveTestCommand returns the command and arguments to run tests for the project based on its detected framework and package manager.
Supported combinations:
nextjs / react + pnpm → pnpm test nextjs / react + yarn → yarn test nextjs / react + npm/"" → npm test go → go test ./...
Types ¶
This section is empty.