summaryrefslogtreecommitdiffstats
path: root/snap
diff options
context:
space:
mode:
authorNiek de Wit <niekdewit@live.nl>2019-03-22 17:07:37 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-04-29 10:51:33 +0200
commit2a171ff1c5d9b1603fe78c67d2d894bb2efccc8b (patch)
treed378f834de9efdabe7b214c423eea4ccd877a556 /snap
parent67f920419a53c7ff11e01c4286dca23e92110a12 (diff)
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
Diffstat (limited to 'snap')
-rw-r--r--snap/snapcraft.yaml6
1 files changed, 5 insertions, 1 deletions
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 36f190bf1..19ca5b9b9 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -67,16 +67,20 @@ parts:
node:
plugin: x-nodejs
- node-packages: [postcss-cli]
+ node-packages: [postcss-cli, @babel/cli]
filesets:
node:
- bin/node
postcss:
- bin/postcss
- lib/node_modules/postcss-cli/*
+ babel:
+ - bin/babel.js
+ - lib/node_modules/@babel/cli/*
prime:
- $node
- $postcss
+ - $babel
pygments:
plugin: python