resources: Add JavaScript transpiling solution
authorNiek de Wit <niekdewit@live.nl>
Fri, 22 Mar 2019 16:07:37 +0000 (17:07 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Wed, 29 Apr 2020 08:51:33 +0000 (10:51 +0200)
commit2a171ff1c5d9b1603fe78c67d2d894bb2efccc8b
treed378f834de9efdabe7b214c423eea4ccd877a556
parent67f920419a53c7ff11e01c4286dca23e92110a12
resources: Add JavaScript transpiling solution

Add a new pipe called TranspileJS which uses the Babel cli. This makes it possible for users to write ES6 JavaScript code and transpile it to ES5 during website generation so that the code still works with older browser versions.

Fixes #5764
docs/content/en/hugo-pipes/transformjs.md [new file with mode: 0755]
resources/resource_transformers/transpilejs/transpilejs.go [new file with mode: 0644]
snap/snapcraft.yaml
tpl/resources/init.go
tpl/resources/resources.go