Rename transpileJS to babel

And add a test.

Updates #5764
This commit is contained in:
Bjørn Erik Pedersen
2020-04-28 14:02:41 +02:00
parent 2a171ff1c5
commit 6add6d77b4
8 changed files with 233 additions and 119 deletions

View File

@@ -16,6 +16,9 @@ package hugo
import (
"fmt"
"html/template"
"os"
"github.com/gohugoio/hugo/config"
)
const (
@@ -69,3 +72,9 @@ func NewInfo(environment string) Info {
Environment: environment,
}
}
func GetExecEnviron(cfg config.Provider) []string {
env := os.Environ()
config.SetEnvVars(&env, "HUGO_ENVIRONMENT", cfg.GetString("environment"))
return env
}