aboutsummaryrefslogtreecommitdiff
path: root/gulpfile.js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2020-05-19 19:04:46 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2020-05-19 19:04:46 +0200
commitfeb43ffdc9c9f3f7fadabc6c11b1afb5322a96c9 (patch)
tree95a907d8570c9c6bfb440a137cc5a69f4b33249b /gulpfile.js
parent84b52984cd7604e736ba0897fdd2c698d26d4641 (diff)
downloadfosdem-2021-minimalism-presentation-feb43ffdc9c9f3f7fadabc6c11b1afb5322a96c9.tar
fosdem-2021-minimalism-presentation-feb43ffdc9c9f3f7fadabc6c11b1afb5322a96c9.tar.gz
rollup cache saves 1s per js build
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 812ce2b..2cdf441 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -73,13 +73,17 @@ const rollupConfigESM = {
]
};
+let rollupCache;
+
// Creates a bundle with broad browser support, exposed
// as UMD
gulp.task('js-es5', () => {
return rollup({
+ cache: rollupCache,
input: 'js/index.js',
...rollupConfig
}).then( bundle => {
+ rollupCache = bundle.cache;
return bundle.write({
name: 'Reveal',
file: './dist/reveal.js',
@@ -93,9 +97,11 @@ gulp.task('js-es5', () => {
// Creates an ES module bundle
gulp.task('js-es6', () => {
return rollup({
+ cache: rollupCache,
input: 'js/index.js',
...rollupConfigESM
}).then( bundle => {
+ rollupCache = bundle.cache;
return bundle.write({
file: './dist/reveal.esm.js',
format: 'es',