Skip to content

Commit 925f084

Browse files
Add a jake task, .gitignore entry, and add tsd as a dev dependency.
1 parent bf989aa commit 925f084

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ tests/services/browser/typescriptServices.js
2828
scripts/configureNightly.js
2929
scripts/processDiagnosticMessages.d.ts
3030
scripts/processDiagnosticMessages.js
31-
scripts/importDefinitelyTypedTests.js
31+
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
3232
src/harness/*.js
3333
rwc-report.html
3434
*.swp
@@ -45,6 +45,7 @@ scripts/run.bat
4545
scripts/word2md.js
4646
scripts/ior.js
4747
scripts/*.js.map
48+
scripts/typings/
4849
coverage/
4950
internal/
5051
**/.DS_Store

Jakefile.js

+21
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,27 @@ task("publish-nightly", ["configure-nightly", "LKG", "clean", "setDebugMode", "r
386386
exec(cmd);
387387
});
388388

389+
var scriptsTsdJson = path.join(scriptsDirectory, "tsd.json");
390+
file(scriptsTsdJson);
391+
392+
task("tsd-scripts", [scriptsTsdJson], function () {
393+
var cmd = "tsd --config " + scriptsTsdJson + " install";
394+
console.log(cmd)
395+
exec(cmd);
396+
}, { async: true })
397+
398+
var importDefinitelyTypedTestsDirectory = path.join(scriptsDirectory, "importDefinitelyTypedTests");
399+
var importDefinitelyTypedTestsJs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.js");
400+
var importDefinitelyTypedTestsTs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.ts");
401+
402+
file(importDefinitelyTypedTestsJs);
403+
file(importDefinitelyTypedTestsTs, ["tsd-scripts", importDefinitelyTypedTestsJs])
404+
task("importDefinitelyTyped", importDefinitelyTypedTestsTs, function () {
405+
var cmd = "node " + importDefinitelyTypedTestsJs + " ./ ../DefinitelyTyped";
406+
console.log(cmd);
407+
exec(cmd);
408+
}, { async: true })
409+
389410
// Local target to build the compiler and services
390411
var tscFile = path.join(builtLocalDirectory, compilerFilename);
391412
compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false);

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"browserify": "latest",
3636
"istanbul": "latest",
3737
"mocha-fivemat-progress-reporter": "latest",
38-
"tslint": "latest"
38+
"tslint": "latest",
39+
"tsd": "latest"
3940
},
4041
"scripts": {
4142
"pretest": "jake tests",

0 commit comments

Comments
 (0)