Skip to content

Commit c29f292

Browse files
committed
Pass relative path to Istanbul's instrumenter
1 parent 0c96837 commit c29f292

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gulpfile.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ var gulp = require('gulp'),
1313
pkg = require('./package.json'),
1414
browserify = require('browserify'),
1515
source = require('vinyl-source-stream'),
16+
path = require('path'),
1617
template = require('lodash').template;
1718

1819
gulp.task('default', ['clean', 'jshint', 'karma', 'build']);
@@ -38,8 +39,9 @@ gulp.task('jshint', function() {
3839
gulp.task('instrument', function() {
3940
return gulp.src('src/**/*.js')
4041
.pipe(map(function(code, filename) {
41-
var instrumenter = new istanbul.Instrumenter();
42-
return instrumenter.instrumentSync(code.toString(), filename);
42+
var instrumenter = new istanbul.Instrumenter(),
43+
relativePath = path.relative(__dirname, filename);
44+
return instrumenter.instrumentSync(code.toString(), relativePath);
4345
}))
4446
.pipe(gulp.dest('src-instrumented'));
4547
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy