MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/buildpacks / ExtractAngularStartCommand

Function ExtractAngularStartCommand

pkg/nodejs/angular.go:88–95  ·  view source on GitHub ↗

ExtractAngularStartCommand inspects the given package.json file for an idiomatic `serve:ssr:APP_NAME` command. If one exists, its value is returned. If not, return an empty string.

(pjs *PackageJSON)

Source from the content-addressed store, hash-verified

86// ExtractAngularStartCommand inspects the given package.json file for an idiomatic `serve:ssr:APP_NAME`
87// command. If one exists, its value is returned. If not, return an empty string.
88func ExtractAngularStartCommand(pjs *PackageJSON) string {
89 for k, v := range pjs.Scripts {
90 if strings.HasPrefix(k, "serve:ssr:") {
91 return v
92 }
93 }
94 return ""
95}

Callers 2

DefaultStartCommandFunction · 0.85

Calls

no outgoing calls

Tested by 1