Skip to content

Commit 7d0a83a

Browse files
committed
chore(gulp-traceur): better error reporting
Use original filename when printing errors (instead of the output).
1 parent 9dd7cae commit 7d0a83a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/transpiler/gulp-traceur.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function gulpTraceur(options, resolveModuleName) {
2424
var originalFilePath = file.history[0];
2525
var moduleName = resolveModuleName ? resolveModuleName(file.relative) : null;
2626
var result = compiler.compile(options, {
27-
inputPath: file.relative,
27+
inputPath: originalFilePath,
2828
outputPath: file.relative,
2929
moduleName: moduleName
3030
}, file.contents.toString());
@@ -46,7 +46,7 @@ function gulpTraceur(options, resolveModuleName) {
4646
done();
4747
} catch (errors) {
4848
if (errors.join) {
49-
throw new Error('gulp-traceur: '+errors.join('\n'));
49+
throw new Error('gulp-traceur:\n ' + errors.join('\n '));
5050
} else {
5151
console.error('Error when transpiling:\n ' + originalFilePath);
5252
throw errors;

0 commit comments

Comments
 (0)