Files
pack/core/providers/node/cra.go
T
zeekay 7844a60aff refactor(pack): modernize to github.com/hanzoai/pack and remove upstream branding
- Migrate module path to github.com/hanzoai/pack across all Go packages
- Remove legacy upstream docs and competitor brand references
- Modernize LLM.md and mise.toml for pristine Hanzo Pack builder
2026-09-04 00:40:42 -07:00

24 lines
589 B
Go

package node
import (
"strings"
"github.com/hanzoai/pack/core/generate"
)
const (
DefaultCRAOutputDirectory = "build"
DefaultCRAStartCommand = "react-scripts start"
)
func (p *NodeProvider) isCRA(ctx *generate.GenerateContext) bool {
hasReactScriptsDep := p.hasDependency("react-scripts")
hasCRABuildCommand := strings.Contains(strings.ToLower(p.packageJson.GetScript("build")), "react-scripts build")
return hasReactScriptsDep && hasCRABuildCommand
}
func (p *NodeProvider) getCRAOutputDirectory(ctx *generate.GenerateContext) string {
return DefaultCRAOutputDirectory
}