"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "docs/content/en/news/0.78.0-relnotes/index.md" between
hugo-0.80.0.tar.gz and hugo-0.81.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).

index.md  (hugo-0.80.0):index.md  (hugo-0.81.0)
skipping to change at line 15 skipping to change at line 15
description: "Resolve JavaScript imports top-down in the layered filesystem, pas s parameters from template to JS, new JS intellisense helper, improved JS build errors." description: "Resolve JavaScript imports top-down in the layered filesystem, pas s parameters from template to JS, new JS intellisense helper, improved JS build errors."
categories: ["Releases"] categories: ["Releases"]
--- ---
This release finally brings full [Hugo Modules](https://gohugo.io/hugo-modules/) support to [js.Build](https://gohugo.io/hugo-pipes/js/), curtsy of he new plugi n API in the really, really fast [ESBuild](https://github.com/evanw/esbuild) by [@evanw](https://github.com/evanw). This release finally brings full [Hugo Modules](https://gohugo.io/hugo-modules/) support to [js.Build](https://gohugo.io/hugo-pipes/js/), curtsy of he new plugi n API in the really, really fast [ESBuild](https://github.com/evanw/esbuild) by [@evanw](https://github.com/evanw).
Some notes on the improvements in this release: Some notes on the improvements in this release:
* Now `js.Build` fully supports the virtual union filesystem in [Hugo Modules](h ttps://gohugo.io/hugo-modules/). Any import inside your JavaScript components wi ll resolve starting from the top component mount inside `/assets` with a fallbac k to the traditional "JS way" (`node_modules` etc.) * Now `js.Build` fully supports the virtual union filesystem in [Hugo Modules](h ttps://gohugo.io/hugo-modules/). Any import inside your JavaScript components wi ll resolve starting from the top component mount inside `/assets` with a fallbac k to the traditional "JS way" (`node_modules` etc.)
* You can now pass configuration data from the templates to your scripts via a n ew `params` option. * You can now pass configuration data from the templates to your scripts via a n ew `params` option.
* Hugo now writes a `jsconfig.js` file inside `/assets` (you can turn it off) wi th import mappings to help editors such as VS Code with intellisense/navigation, which is especially useful when there is no common root and the source lives in side some temporary directory. * Hugo now writes a `jsconfig.json` file inside `/assets` (you can turn it off) with import mappings to help editors such as VS Code with intellisense/navigatio n, which is especially useful when there is no common root and the source lives inside some temporary directory.
* We have also improved the build errors you get from `js.Build`. In server mode you will get a preview of the failing lines and in the console you will get a l ink to the location. * We have also improved the build errors you get from `js.Build`. In server mode you will get a preview of the failing lines and in the console you will get a l ink to the location.
Read more about this in [the documentation](https://gohugo.io/hugo-pipes/js/), b ut a short usage example would look like: Read more about this in [the documentation](https://gohugo.io/hugo-pipes/js/), b ut a short usage example would look like:
In the template: In the template:
```go-html-template ```go-html-template
{{ $js := resources.Get "js/main.js" | js.Build (dict "params" (dict "api" "http s://example.org/api" ) }} {{ $js := resources.Get "js/main.js" | js.Build (dict "params" (dict "api" "http s://example.org/api" ) }}
``` ```
 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)