build: bootstrap: add pnpm install (#3959)

Co-authored-by: James Elliott <james-d-elliott@users.noreply.github.com>
pull/3962/head
Manuel Nuñez 2022-09-04 23:13:59 -03:00 committed by GitHub
parent cd6d034e5b
commit 3794745bee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -54,6 +54,7 @@ func cmdBootstrapRun(_ *cobra.Command, _ []string) {
createTemporaryDirectory() createTemporaryDirectory()
createPNPMDirectory() createPNPMDirectory()
pnpmInstall()
bootstrapPrintln("Preparing /etc/hosts to serve subdomains of example.com...") bootstrapPrintln("Preparing /etc/hosts to serve subdomains of example.com...")
prepareHostsFile() prepareHostsFile()
@ -156,6 +157,17 @@ func createPNPMDirectory() {
} }
} }
func pnpmInstall() {
bootstrapPrintln("Installing web dependences ")
cwd, err := os.Getwd()
if err != nil {
panic(err)
}
shell(fmt.Sprintf("cd %s/web && pnpm install", cwd))
}
func bootstrapPrintln(args ...interface{}) { func bootstrapPrintln(args ...interface{}) {
a := make([]interface{}, 0) a := make([]interface{}, 0)
a = append(a, "[BOOTSTRAP]") a = append(a, "[BOOTSTRAP]")