summaryrefslogtreecommitdiff
path: root/.babelrc
diff options
context:
space:
mode:
authorMike Greiling <mgreiling@gitlab.com>2017-03-20 22:29:45 +0000
committerAlfredo Sumaran <alfredo@gitlab.com>2017-03-20 22:29:45 +0000
commitfde335bfb755e766e058b25c65cbc514df9b33f9 (patch)
treed829eaccef8913b269b2915f2d9ee615c1adaffe /.babelrc
parentb26d4d2ac4cdf3a66e16918dae28d9b724557dd2 (diff)
downloadgitlab-ce-fde335bfb755e766e058b25c65cbc514df9b33f9.tar.gz
Only add frontend code coverage instrumentation when generating coverage report
Diffstat (limited to '.babelrc')
-rw-r--r--.babelrc21
1 files changed, 21 insertions, 0 deletions
diff --git a/.babelrc b/.babelrc
new file mode 100644
index 00000000000..ee4c391da30
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,21 @@
+{
+ "presets": [
+ ["latest", { "es2015": { "modules": false } }],
+ "stage-2"
+ ],
+ "env": {
+ "coverage": {
+ "plugins": [
+ ["istanbul", {
+ "exclude": [
+ "app/assets/javascripts/droplab/**/*",
+ "spec/javascripts/**/*"
+ ]
+ }],
+ ["transform-define", {
+ "process.env.BABEL_ENV": "coverage"
+ }]
+ ]
+ }
+ }
+}