github.com/wawandco/ox@v0.13.6-0.20230809142027-913b3d837f2a/plugins/tools/node/build.go (about) 1 package node 2 3 import ( 4 "context" 5 "os" 6 ) 7 8 // Builder sets up the NODE_ENV variable 9 type Builder struct{} 10 11 func (b Builder) Name() string { 12 return "node/build" 13 } 14 15 func (b Builder) RunBeforeBuild(ctx context.Context, root string, args []string) error { 16 return os.Setenv("NODE_ENV", os.Getenv("GO_ENV")) 17 }