Created
June 8, 2015 11:45
-
-
Save liwo/f3e4d46a61f73bd74cd0 to your computer and use it in GitHub Desktop.
Minimal setup to demonstrate sentry problem with sourcesContent in sourcemaps. To build it, run `npm install && bower install && grunt`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (Raven) { | |
var dsn = ''; // Add dsn here! | |
Raven.config(dsn, { | |
logger: "javascript", | |
fetchContext: true | |
}).install() | |
}(window.Raven)); | |
/*global angular:false */ | |
(function (window, angular, undefined) { | |
'use strict'; | |
var app = angular.module('netlogix.test', [ | |
'ngRaven' | |
]); | |
app.config(['$ravenProvider', function ($ravenProvider) { | |
$ravenProvider.development(false); | |
}]); | |
app.controller('AppController', [function () { | |
var self = this; | |
self.testRaven = function () { | |
throw new Error('Raven should send this event for testing'); | |
}; | |
return self; | |
}]); | |
}(window, angular)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "js-sourcemap-debug", | |
"version": "0.0.0", | |
"authors": [ | |
"Lienhart Woitok <[email protected]>" | |
], | |
"main": "index.html", | |
"license": "MIT", | |
"private": true, | |
"ignore": [ | |
"**/.*", | |
"node_modules", | |
"bower_components", | |
"test", | |
"tests" | |
], | |
"dependencies": { | |
"angular": "1.3.16", | |
"angular-strap": "~2.1.3", | |
"angular-raven": "~0.5.10" | |
}, | |
"resolutions": { | |
"angular": "1.3.16" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app="netlogix.test" ng-controller="AppController as App"> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>Broken</title> | |
<script src="broken.min.js"></script> | |
<script src="bower_components/angular-raven/angular-raven.min.js"></script> | |
<script src="app.js"></script> | |
</head> | |
<body> | |
<a ng-click="App.testRaven()">Trigger error</a> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app="netlogix.test" ng-controller="AppController as App"> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>Good</title> | |
<script src="good.min.js"></script> | |
<script src="bower_components/angular-raven/angular-raven.min.js"></script> | |
<script src="app.js"></script> | |
</head> | |
<body> | |
<a ng-click="App.testRaven()">Trigger error</a> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (grunt) { | |
'use strict'; | |
grunt.initConfig({ | |
concat: { | |
options: { | |
sourceMap: true | |
}, | |
broken: { | |
src: ['bower_components/jquery/dist/jquery.min.js', 'bower_components/angular/angular.min.js', 'bower_components/angular-strap/dist/angular-strap.min.js', 'bower_components/raven-js/dist/raven.min.js'], | |
dest: 'broken.min.js' | |
}, | |
good: { | |
src: ['bower_components/jquery/dist/jquery.min.js', 'bower_components/angular/angular.min.js', 'bower_components/raven-js/dist/raven.min.js'], | |
dest: 'good.min.js' | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.registerTask('default', ['concat']); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>Test page index</title> | |
</head> | |
<body> | |
<ul> | |
<li><a href="good.html">Throw working error</a></li> | |
<li><a href="broken.html">Throw broken error</a></li> | |
</ul> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "js-sourcemap-debug", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"private": true, | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"devDependencies": { | |
"grunt": "^0.4.5", | |
"grunt-contrib-concat": "^0.5.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment