Skip to content

Commit

Permalink
Merge pull request #612 from nextcloud/enhancement/js-dev-sourcemap
Browse files Browse the repository at this point in the history
Add proper sourcemap support, esp. for unit test failures
  • Loading branch information
ChristophWurst committed Nov 14, 2017
2 parents 0b73dec + 71be615 commit 8c9829f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ module.exports = function (config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'js/**[!vendor]/*[!spec].js': ['coverage'],
'js/**[!vendor]/*[!spec].js': ['coverage', 'sourcemap'],
// add webpack as preprocessor
'js/tests/*_spec.js': ['webpack'],
'js/tests/**/*_spec.js': ['webpack']
'js/tests/*_spec.js': ['webpack', 'sourcemap'],
'js/tests/**/*_spec.js': ['webpack', 'sourcemap']
},

webpackMiddleware: {
Expand Down
4 changes: 3 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"karma-phantomjs-launcher": "^1.0.4",
"karma-requirejs": "^1.1.0",
"karma-sinon": "^1.0.5",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.6",
"phantomjs-prebuilt": "^2.1.16",
"raw-loader": "^0.5.1",
Expand All @@ -69,7 +70,6 @@
"jquery-ui": "1.10.4",
"jquery-visibility": "~1.0.11",
"js-storage": "1.0.1",
"karma-sourcemap-loader": "^0.3.7",
"requirejs": "^2.3.3",
"underscore": "~1.8.3"
}
Expand Down

0 comments on commit 8c9829f

Please sign in to comment.