@@ -138,7 +138,10 @@ var harnessSources = harnessCoreSources.concat([
138
138
"projectErrors.ts" ,
139
139
"matchFiles.ts" ,
140
140
"initializeTSConfig.ts" ,
141
- "extractMethods.ts" ,
141
+ "extractConstants.ts" ,
142
+ "extractFunctions.ts" ,
143
+ "extractRanges.ts" ,
144
+ "extractTestHelpers.ts" ,
142
145
"printer.ts" ,
143
146
"textChanges.ts" ,
144
147
"telemetry.ts" ,
@@ -1104,9 +1107,10 @@ var instrumenterPath = harnessDirectory + 'instrumenter.ts';
1104
1107
var instrumenterJsPath = builtLocalDirectory + 'instrumenter.js' ;
1105
1108
compileFile ( instrumenterJsPath , [ instrumenterPath ] , [ tscFile , instrumenterPath ] . concat ( libraryTargets ) , [ ] , /*useBuiltCompiler*/ true , { lib : "es6" , types : [ "node" ] , noOutFile : true , outDir : builtLocalDirectory } ) ;
1106
1109
1107
- desc ( "Builds an instrumented tsc.js" ) ;
1110
+ desc ( "Builds an instrumented tsc.js - run with test=[testname] " ) ;
1108
1111
task ( 'tsc-instrumented' , [ loggedIOJsPath , instrumenterJsPath , tscFile ] , function ( ) {
1109
- var cmd = host + ' ' + instrumenterJsPath + ' record iocapture ' + builtLocalDirectory + compilerFilename ;
1112
+ var test = process . env . test || process . env . tests || process . env . t || "iocapture" ;
1113
+ var cmd = host + ' ' + instrumenterJsPath + " record " + test + " " + builtLocalDirectory + compilerFilename ;
1110
1114
console . log ( cmd ) ;
1111
1115
var ex = jake . createExec ( [ cmd ] ) ;
1112
1116
ex . addListener ( "cmdEnd" , function ( ) {
@@ -1121,7 +1125,7 @@ task("update-sublime", ["local", serverFile], function () {
1121
1125
jake . cpR ( serverFile + ".map" , "../TypeScript-Sublime-Plugin/tsserver/" ) ;
1122
1126
} ) ;
1123
1127
1124
- var tslintRuleDir = "scripts/tslint" ;
1128
+ var tslintRuleDir = "scripts/tslint/rules " ;
1125
1129
var tslintRules = [
1126
1130
"booleanTriviaRule" ,
1127
1131
"debugAssertRule" ,
@@ -1137,13 +1141,27 @@ var tslintRulesFiles = tslintRules.map(function (p) {
1137
1141
return path . join ( tslintRuleDir , p + ".ts" ) ;
1138
1142
} ) ;
1139
1143
var tslintRulesOutFiles = tslintRules . map ( function ( p ) {
1140
- return path . join ( builtLocalDirectory , "tslint" , p + ".js" ) ;
1144
+ return path . join ( builtLocalDirectory , "tslint/rules" , p + ".js" ) ;
1145
+ } ) ;
1146
+ var tslintFormattersDir = "scripts/tslint/formatters" ;
1147
+ var tslintFormatters = [
1148
+ "autolinkableStylishFormatter" ,
1149
+ ] ;
1150
+ var tslintFormatterFiles = tslintFormatters . map ( function ( p ) {
1151
+ return path . join ( tslintFormattersDir , p + ".ts" ) ;
1152
+ } ) ;
1153
+ var tslintFormattersOutFiles = tslintFormatters . map ( function ( p ) {
1154
+ return path . join ( builtLocalDirectory , "tslint/formatters" , p + ".js" ) ;
1141
1155
} ) ;
1142
1156
desc ( "Compiles tslint rules to js" ) ;
1143
- task ( "build-rules" , [ "build-rules-start" ] . concat ( tslintRulesOutFiles ) . concat ( [ "build-rules-end" ] ) ) ;
1157
+ task ( "build-rules" , [ "build-rules-start" ] . concat ( tslintRulesOutFiles ) . concat ( tslintFormattersOutFiles ) . concat ( [ "build-rules-end" ] ) ) ;
1144
1158
tslintRulesFiles . forEach ( function ( ruleFile , i ) {
1145
1159
compileFile ( tslintRulesOutFiles [ i ] , [ ruleFile ] , [ ruleFile ] , [ ] , /*useBuiltCompiler*/ false ,
1146
- { noOutFile : true , generateDeclarations : false , outDir : path . join ( builtLocalDirectory , "tslint" ) , lib : "es6" } ) ;
1160
+ { noOutFile : true , generateDeclarations : false , outDir : path . join ( builtLocalDirectory , "tslint/rules" ) , lib : "es6" } ) ;
1161
+ } ) ;
1162
+ tslintFormatterFiles . forEach ( function ( ruleFile , i ) {
1163
+ compileFile ( tslintFormattersOutFiles [ i ] , [ ruleFile ] , [ ruleFile ] , [ ] , /*useBuiltCompiler*/ false ,
1164
+ { noOutFile : true , generateDeclarations : false , outDir : path . join ( builtLocalDirectory , "tslint/formatters" ) , lib : "es6" } ) ;
1147
1165
} ) ;
1148
1166
1149
1167
desc ( "Emit the start of the build-rules fold" ) ;
@@ -1211,8 +1229,8 @@ task("lint", ["build-rules"], () => {
1211
1229
const fileMatcher = process . env . f || process . env . file || process . env . files ;
1212
1230
const files = fileMatcher
1213
1231
? `src/**/${ fileMatcher } `
1214
- : "Gulpfile.ts 'scripts/tslint/*.ts' 'src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts'" ;
1215
- const cmd = `node node_modules/tslint/bin/tslint ${ files } --format stylish ` ;
1232
+ : "Gulpfile.ts 'scripts/tslint/**/* .ts' 'src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts'" ;
1233
+ const cmd = `node node_modules/tslint/bin/tslint ${ files } --formatters-dir ./built/local/tslint/formatters -- format autolinkableStylish ` ;
1216
1234
console . log ( "Linting: " + cmd ) ;
1217
1235
jake . exec ( [ cmd ] , { interactive : true } , ( ) => {
1218
1236
if ( fold . isTravis ( ) ) console . log ( fold . end ( "lint" ) ) ;
0 commit comments