[TASK] Add sentry for debug

This commit is contained in:
Xaver Maierhofer 2017-03-18 16:33:50 +01:00
parent bd7a93de73
commit 44f44b7869
No known key found for this signature in database
GPG Key ID: 7FDCE23FD2EC9FE8
5 changed files with 11 additions and 1 deletions

View File

@ -4,7 +4,7 @@ module.exports = function (gulp, plugins, config) {
.pipe(gulp.dest(config.build)); .pipe(gulp.dest(config.build));
gulp.src(['assets/logo.svg']) gulp.src(['assets/logo.svg'])
.pipe(gulp.dest(config.build)); .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')); .pipe(gulp.dest(config.build + '/vendor'));
return gulp.src(['assets/fonts/*', 'assets/icons/fonts/*']) return gulp.src(['assets/fonts/*', 'assets/icons/fonts/*'])
.pipe(gulp.dest(config.build + '/fonts')); .pipe(gulp.dest(config.build + '/fonts'));

View File

@ -10,6 +10,10 @@
<!-- endinject --> <!-- endinject -->
<script src="vendor/polyfill.js" inline></script> <script src="vendor/polyfill.js" inline></script>
<script src="vendor/promise.js" inline></script> <script src="vendor/promise.js" inline></script>
<script src="vendor/raven.js" inline></script>
<script>
Raven.config('https://d01637ef6bde46a2b891113a175e8df8@sentry.xaver.xyz/2').install();
</script>
<script src="app.js"></script> <script src="app.js"></script>
</head> </head>
<body> <body>

View File

@ -170,6 +170,7 @@ define(['moment', 'utils/router', 'leaflet', 'gui', 'helper', 'utils/language'],
document.querySelector('.loader').innerHTML += e.message document.querySelector('.loader').innerHTML += e.message
+ '<br /><br /><button onclick="location.reload(true)" class="btn text">Try to reload</button><br /> or report to your community'; + '<br /><br /><button onclick="location.reload(true)" class="btn text">Try to reload</button><br /> or report to your community';
console.warn(e); console.warn(e);
Raven.captureException(e);
}); });
}; };
}); });

View File

@ -51,6 +51,7 @@
"navigo": "^4.6.0", "navigo": "^4.6.0",
"node-polyglot": "^2.2.2", "node-polyglot": "^2.2.2",
"promise-polyfill": "^6.0.2", "promise-polyfill": "^6.0.2",
"raven-js": "^3.14.2",
"rbush": "^2.0.1", "rbush": "^2.0.1",
"requirejs": "^2.3.2", "requirejs": "^2.3.2",
"snabbdom": "^0.6.4" "snabbdom": "^0.6.4"

View File

@ -3729,6 +3729,10 @@ range-parser@~1.2.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" 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: rbush@^2.0.1:
version "2.0.1" version "2.0.1"
resolved "https://registry.yarnpkg.com/rbush/-/rbush-2.0.1.tgz#4cfaca28c3064bc0ee75431a1b79990e875eefa9" resolved "https://registry.yarnpkg.com/rbush/-/rbush-2.0.1.tgz#4cfaca28c3064bc0ee75431a1b79990e875eefa9"