()
| 50 | } |
| 51 | |
| 52 | func (f *Finalizer) ReadPackageJSON() error { |
| 53 | var p struct { |
| 54 | Scripts struct { |
| 55 | StartScript string `json:"start"` |
| 56 | } `json:"scripts"` |
| 57 | } |
| 58 | |
| 59 | if err := libbuildpack.NewJSON().Load(filepath.Join(f.Stager.BuildDir(), "package.json"), &p); err != nil { |
| 60 | if os.IsNotExist(err) { |
| 61 | f.Log.Warning("No package.json found") |
| 62 | return nil |
| 63 | } |
| 64 | |
| 65 | return err |
| 66 | } |
| 67 | |
| 68 | f.StartScript = p.Scripts.StartScript |
| 69 | |
| 70 | return nil |
| 71 | } |
| 72 | |
| 73 | func (f *Finalizer) CopyProfileScripts() error { |
| 74 | profiledDir := filepath.Join(f.Stager.DepDir(), "profile.d") |
no test coverage detected