Skip to content

Commit bb7cfd1

Browse files
committed
Fix jakefile
1 parent cb4577e commit bb7cfd1

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Jakefile.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ var languageServiceLibrarySources = [
113113
return path.join(serverDirectory, f);
114114
}).concat(servicesSources);
115115

116-
var harnessSources = [
116+
var harnessCoreSources = [
117117
"harness.ts",
118118
"sourceMapRecorder.ts",
119119
"harnessLanguageService.ts",
@@ -129,7 +129,9 @@ var harnessSources = [
129129
"runner.ts"
130130
].map(function (f) {
131131
return path.join(harnessDirectory, f);
132-
}).concat([
132+
});
133+
134+
var harnessSources = harnessCoreSources.concat([
133135
"incrementalParser.ts",
134136
"jsDocParsing.ts",
135137
"services/colorization.ts",
@@ -730,13 +732,13 @@ task("update-sublime", ["local", serverFile], function() {
730732
// run this task automatically
731733
desc("Runs tslint on the compiler sources");
732734
task("lint", [], function() {
733-
var lintTagets = compilerSources.concat(harnessSources);
734-
for(var i in lintTagets) {
735-
var f = lintTagets[i];
735+
function success(f) { return function() { console.log('SUCCESS: No linter errors in ' + f + '\n'); }};
736+
function failure(f) { return function() { console.log('FAILURE: Please fix linting errors in ' + f + '\n') }};
737+
738+
var lintTargets = compilerSources.concat(harnessCoreSources);
739+
for(var i in lintTargets) {
740+
var f = lintTargets[i];
736741
var cmd = 'tslint -f ' + f;
737-
exec(cmd,
738-
function() { console.log('SUCCESS: No linter errors'); },
739-
function() { console.log('FAILURE: Please fix linting errors in ' + f + '\n');
740-
});
742+
exec(cmd, success(f), failure(f));
741743
}
742744
}, { async: true });

0 commit comments

Comments
 (0)