diff --git a/gulp/tasks/copy.js b/gulp/tasks/copy.js index 17be9db..34f71b2 100644 --- a/gulp/tasks/copy.js +++ b/gulp/tasks/copy.js @@ -4,7 +4,7 @@ module.exports = function (gulp, plugins, config) { .pipe(gulp.dest(config.build)); gulp.src(['assets/logo.svg']) .pipe(gulp.dest(config.build)); - gulp.src(['node_modules/promise-polyfill/promise.js', 'polyfill.js']) + gulp.src(['node_modules/promise-polyfill/promise.js', 'polyfill.js', 'node_modules/raven-js/dist/raven.js']) .pipe(gulp.dest(config.build + '/vendor')); return gulp.src(['assets/fonts/*', 'assets/icons/fonts/*']) .pipe(gulp.dest(config.build + '/fonts')); diff --git a/html/index.html b/html/index.html index c731ef5..e66a8f9 100644 --- a/html/index.html +++ b/html/index.html @@ -10,6 +10,10 @@ + + diff --git a/lib/main.js b/lib/main.js index 9014e02..98b6fd5 100644 --- a/lib/main.js +++ b/lib/main.js @@ -170,6 +170,7 @@ define(['moment', 'utils/router', 'leaflet', 'gui', 'helper', 'utils/language'], document.querySelector('.loader').innerHTML += e.message + '


or report to your community'; console.warn(e); + Raven.captureException(e); }); }; }); diff --git a/package.json b/package.json index b9c93ba..bff7154 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "navigo": "^4.6.0", "node-polyglot": "^2.2.2", "promise-polyfill": "^6.0.2", + "raven-js": "^3.14.2", "rbush": "^2.0.1", "requirejs": "^2.3.2", "snabbdom": "^0.6.4" diff --git a/yarn.lock b/yarn.lock index 0c6da3c..37d0326 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3729,6 +3729,10 @@ range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" +raven-js@^3.14.2: + version "3.14.2" + resolved "https://registry.yarnpkg.com/raven-js/-/raven-js-3.14.2.tgz#9db2ffdd282e999e9d75541d4fa018be8d5266f4" + rbush@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/rbush/-/rbush-2.0.1.tgz#4cfaca28c3064bc0ee75431a1b79990e875eefa9"