"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "hugolib/hugo_sites_build.go" between
hugo-0.85.0.tar.gz and hugo-0.86.0.tar.gz

About: Hugo is a static site generator that takes a source directory of Markdown files and templates and uses these as input to create a complete website (written in Go).

hugo_sites_build.go  (hugo-0.85.0):hugo_sites_build.go  (hugo-0.86.0)
skipping to change at line 359 skipping to change at line 359
// This will only be set when js.Build have been triggered with // This will only be set when js.Build have been triggered with
// imports that resolves to the project or a module. // imports that resolves to the project or a module.
// Write a jsconfig.json file to the project's /asset directory // Write a jsconfig.json file to the project's /asset directory
// to help JS intellisense in VS Code etc. // to help JS intellisense in VS Code etc.
if !h.ResourceSpec.BuildConfig.NoJSConfigInAssets && h.BaseFs.Assets.Dirs != nil { if !h.ResourceSpec.BuildConfig.NoJSConfigInAssets && h.BaseFs.Assets.Dirs != nil {
fi, err := h.BaseFs.Assets.Fs.Stat("") fi, err := h.BaseFs.Assets.Fs.Stat("")
if err != nil { if err != nil {
h.Log.Warnf("Failed to resolve jsconfig.json dir: %s", er r) h.Log.Warnf("Failed to resolve jsconfig.json dir: %s", er r)
} else { } else {
m := fi.(hugofs.FileMetaInfo).Meta() m := fi.(hugofs.FileMetaInfo).Meta()
assetsDir := m.SourceRoot() assetsDir := m.SourceRoot
if strings.HasPrefix(assetsDir, h.ResourceSpec.WorkingDir ) { if strings.HasPrefix(assetsDir, h.ResourceSpec.WorkingDir ) {
if jsConfig := h.ResourceSpec.JSConfigBuilder.Bui ld(assetsDir); jsConfig != nil { if jsConfig := h.ResourceSpec.JSConfigBuilder.Bui ld(assetsDir); jsConfig != nil {
b, err := json.MarshalIndent(jsConfig, "" , " ") b, err := json.MarshalIndent(jsConfig, "" , " ")
if err != nil { if err != nil {
h.Log.Warnf("Failed to create jsc onfig.json: %s", err) h.Log.Warnf("Failed to create jsc onfig.json: %s", err)
} else { } else {
filename := filepath.Join(assetsD ir, "jsconfig.json") filename := filepath.Join(assetsD ir, "jsconfig.json")
if h.running { if h.running {
h.skipRebuildForFilenames Mu.Lock() h.skipRebuildForFilenames Mu.Lock()
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)