From ff6ec2ec6b2ab4aa31c41d31e976ca4f50dc6699 Mon Sep 17 00:00:00 2001 From: isymchych Date: Fri, 4 Dec 2015 15:46:25 +0200 Subject: [PATCH] use babel --- .jshintrc | 3 ++- app.js | 1 + package.json | 13 +++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.jshintrc b/.jshintrc index a86fe00e7d..eaa69ba528 100644 --- a/.jshintrc +++ b/.jshintrc @@ -15,5 +15,6 @@ "newcap": true, // true: Require capitalization of all constructor functions e.g. `new F()` "maxlen": 80, // {int} Max number of characters per line "latedef": false, //This option prohibits the use of a variable before it was defined - "laxbreak": true //Ignore line breaks around "=", "==", "&&", etc. + "laxbreak": true, //Ignore line breaks around "=", "==", "&&", etc. + "esnext": true //support ES2015 } diff --git a/app.js b/app.js index d6bb316830..5b89a24dbe 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,7 @@ /* global $, JitsiMeetJS, config, Promise */ /* application specific logic */ +import "babel-polyfill"; require("jquery"); require("jquery-ui"); require("strophe"); diff --git a/package.json b/package.json index c133f3c078..5f4e2ec30e 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,10 @@ "jshint": "2.8.0", "precommit-hook": "3.0.0", "uglify-js": "2.4.24", - "clean-css": "*" + "clean-css": "*", + "babelify": "*", + "babel-preset-es2015": "*", + "babel-polyfill": "*" }, "license": "Apache-2.0", "scripts": { @@ -54,9 +57,15 @@ ], "browserify": { "transform": [ - "browserify-shim" + "browserify-shim", + ["babelify", { + "ignore": "node_modules" + }] ] }, + "babel": { + "presets": ["es2015"] + }, "browser": { "jquery": "./node_modules/jquery/dist/jquery.js", "jquery-ui": "./node_modules/jquery-ui/jquery-ui.js",