Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'rollup.config.js')
-rw-r--r--rollup.config.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/rollup.config.js b/rollup.config.js
new file mode 100644
index 00000000..56e7e972
--- /dev/null
+++ b/rollup.config.js
@@ -0,0 +1,26 @@
+const commonjs = require('rollup-plugin-commonjs');
+const babel = require('rollup-plugin-babel');
+const glob = require('glob');
+
+module.exports = glob.sync(
+ 'content/frontend/bundles/*.js',
+).map(file => ({
+ input: file,
+ output: {
+ file: mapDirectory(file),
+ format: 'iife',
+ name: file,
+ },
+ plugins: [
+ commonjs(),
+ babel({
+ exclude: 'node_modules/**',
+ babelrc: false,
+ presets: ["@babel/preset-env"],
+ }),
+ ]
+}));
+
+function mapDirectory(file) {
+ return file.replace('content/', 'public/');
+}