From 9efcce8b01780f61d55cec04073173cc5e59f5ec Mon Sep 17 00:00:00 2001
From: xamgore <xamgore@ya.ru>
Date: Wed, 18 May 2016 11:58:00 +0300
Subject: [PATCH] Add es6 support

---
 gulpfile.js  | 2 ++
 package.json | 8 +++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/gulpfile.js b/gulpfile.js
index 3f4655075..386030bfd 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -2,6 +2,7 @@
 var minimist = require('minimist');
 var fs = require('fs');
 var lazypipe = require('lazypipe');
+var babel = require('gulp-babel');
 
 // command line arguments
 var varg = minimist(process.argv.slice(2), {
@@ -98,6 +99,7 @@ var pipes = (function () {
         .pipe(cssPipe);
 
     var jsPipe = lazypipe()
+        .pipe(babel, { presets: ['es2015'] })
         .pipe(options.opt ? uglify : prettify);
 
     var twigPipe = empty;
diff --git a/package.json b/package.json
index 2cc3f203b..863a86b8d 100644
--- a/package.json
+++ b/package.json
@@ -3,15 +3,17 @@
   "version": "0.0.0",
   "dependencies": {},
   "devDependencies": {
+    "babel-preset-es2015": "^6.9.0",
     "gulp": "^3.9.1",
-    "gulp-changed": "^1.3.0",
     "gulp-autoprefixer": "^3.1.0",
+    "gulp-babel": "^6.1.2",
+    "gulp-changed": "^1.3.0",
     "gulp-filter": "^4.0.0",
-    "gulp-less": "^3.1.0",
     "gulp-jsbeautifier": "^2.0.3",
+    "gulp-less": "^3.1.0",
     "gulp-minify-css": "^1.2.4",
-    "lazypipe": "^1.0.1",
     "gulp-uglify": "^1.5.3",
+    "lazypipe": "^1.0.1",
     "minimist": "^1.2.0",
     "through": "^2.3.8"
   }
-- 
GitLab