diff --git a/tasks/modules/compile.js b/tasks/modules/compile.js index 075ebe62..1fa207c7 100644 --- a/tasks/modules/compile.js +++ b/tasks/modules/compile.js @@ -138,12 +138,13 @@ function compileAllFiles(options, compilationInfo) { files = [referenceFile]; } files = _.map(files, function (item) { return utils.possiblyQuotedRelativePath(item); }); - var args = files.slice(0); + var args = []; exports.grunt.log.verbose.writeln("TypeScript path: " + tsc); if (tsconfig && tsconfig.passThrough) { args.push('--project', tsconfig.tsconfig); } else { + args = files.slice(0); if (options.sourceMap) { args.push('--sourcemap'); } @@ -485,4 +486,4 @@ function compileAllFiles(options, compilationInfo) { }); } exports.compileAllFiles = compileAllFiles; -//# sourceMappingURL=compile.js.map \ No newline at end of file +//# sourceMappingURL=compile.js.map diff --git a/tasks/modules/compile.ts b/tasks/modules/compile.ts index ebef7893..39a101f6 100644 --- a/tasks/modules/compile.ts +++ b/tasks/modules/compile.ts @@ -208,13 +208,14 @@ export function compileAllFiles(options: Partial, compilationIn // Quote the files to compile. Needed for command line parsing by tsc files = _.map(files, item => utils.possiblyQuotedRelativePath(item)); - let args: string[] = files.slice(0); + let args: string[] = []; grunt.log.verbose.writeln(`TypeScript path: ${tsc}`); if (tsconfig && tsconfig.passThrough) { args.push('--project', tsconfig.tsconfig); } else { + args = files.slice(0); if (options.sourceMap) { args.push('--sourcemap'); }