adjust typing directory

This commit is contained in:
Vladimir Matveev 2016-08-14 23:07:25 -07:00
parent 12cdda17f0
commit 5424df7be5
2 changed files with 4 additions and 3 deletions

View File

@ -179,11 +179,11 @@ namespace ts.server {
basePath = os.homedir();
break;
case "darwin":
basePath = combinePaths(os.homedir(), "/Library/Application Support/")
basePath = combinePaths(os.homedir(), "Library/Application Support/")
break;
}
if (basePath) {
this.cachePath = combinePaths(normalizeSlashes(basePath), "/Microsoft/TypeScript");
this.cachePath = combinePaths(normalizeSlashes(basePath), "Microsoft/TypeScript");
}
}

View File

@ -60,7 +60,8 @@ namespace ts.server.typingsInstaller {
this.runTsd(req.cachePath, typingsToInstall, installedTypings => {
// TODO: record new missing package names
// TODO: watch project directory
installedTypings = installedTypings.map(x => getNormalizedAbsolutePath(x, req.cachePath));
const typingDirectory = combinePaths(req.cachePath, "typings");
installedTypings = installedTypings.map(x => combinePaths(typingDirectory, x));
this.sendResponse(this.createResponse(req, currentlyCachedTypings.concat(installedTypings)));
});
}