From 925f0843d90956ea27fd3775bf3d1935ea5cf6d4 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 17 Sep 2015 17:55:07 -0700 Subject: [PATCH] Add a jake task, .gitignore entry, and add tsd as a dev dependency. --- .gitignore | 3 ++- Jakefile.js | 21 +++++++++++++++++++++ package.json | 3 ++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 58a45545939..9a513646e9c 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,7 @@ tests/services/browser/typescriptServices.js scripts/configureNightly.js scripts/processDiagnosticMessages.d.ts scripts/processDiagnosticMessages.js -scripts/importDefinitelyTypedTests.js +scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js src/harness/*.js rwc-report.html *.swp @@ -45,6 +45,7 @@ scripts/run.bat scripts/word2md.js scripts/ior.js scripts/*.js.map +scripts/typings/ coverage/ internal/ **/.DS_Store diff --git a/Jakefile.js b/Jakefile.js index 77d81071e66..cdb03d7f778 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -386,6 +386,27 @@ task("publish-nightly", ["configure-nightly", "LKG", "clean", "setDebugMode", "r exec(cmd); }); +var scriptsTsdJson = path.join(scriptsDirectory, "tsd.json"); +file(scriptsTsdJson); + +task("tsd-scripts", [scriptsTsdJson], function () { + var cmd = "tsd --config " + scriptsTsdJson + " install"; + console.log(cmd) + exec(cmd); +}, { async: true }) + +var importDefinitelyTypedTestsDirectory = path.join(scriptsDirectory, "importDefinitelyTypedTests"); +var importDefinitelyTypedTestsJs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.js"); +var importDefinitelyTypedTestsTs = path.join(importDefinitelyTypedTestsDirectory, "importDefinitelyTypedTests.ts"); + +file(importDefinitelyTypedTestsJs); +file(importDefinitelyTypedTestsTs, ["tsd-scripts", importDefinitelyTypedTestsJs]) +task("importDefinitelyTyped", importDefinitelyTypedTestsTs, function () { + var cmd = "node " + importDefinitelyTypedTestsJs + " ./ ../DefinitelyTyped"; + console.log(cmd); + exec(cmd); +}, { async: true }) + // Local target to build the compiler and services var tscFile = path.join(builtLocalDirectory, compilerFilename); compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false); diff --git a/package.json b/package.json index b743b04838d..ba8edd188e4 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "browserify": "latest", "istanbul": "latest", "mocha-fivemat-progress-reporter": "latest", - "tslint": "latest" + "tslint": "latest", + "tsd": "latest" }, "scripts": { "pretest": "jake tests",