From 7d0a83a24c8a9deab50739f5ed682c96ee9f692e Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Wed, 5 Nov 2014 11:42:23 -0800 Subject: [PATCH] chore(gulp-traceur): better error reporting Use original filename when printing errors (instead of the output). --- tools/transpiler/gulp-traceur.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/transpiler/gulp-traceur.js b/tools/transpiler/gulp-traceur.js index 3f63b35187..5054c5c864 100644 --- a/tools/transpiler/gulp-traceur.js +++ b/tools/transpiler/gulp-traceur.js @@ -24,7 +24,7 @@ function gulpTraceur(options, resolveModuleName) { var originalFilePath = file.history[0]; var moduleName = resolveModuleName ? resolveModuleName(file.relative) : null; var result = compiler.compile(options, { - inputPath: file.relative, + inputPath: originalFilePath, outputPath: file.relative, moduleName: moduleName }, file.contents.toString()); @@ -46,7 +46,7 @@ function gulpTraceur(options, resolveModuleName) { done(); } catch (errors) { if (errors.join) { - throw new Error('gulp-traceur: '+errors.join('\n')); + throw new Error('gulp-traceur:\n ' + errors.join('\n ')); } else { console.error('Error when transpiling:\n ' + originalFilePath); throw errors;