From acd4914c0e1f745e5699e224e15706f804c241ea Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Sat, 31 Jan 2015 21:14:28 -0800 Subject: [PATCH] Rename the main node package filename to match the package name --- Jakefile | 8 ++++++-- package.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Jakefile b/Jakefile index 15661debff6..2d6db20d386 100644 --- a/Jakefile +++ b/Jakefile @@ -323,6 +323,7 @@ var tscFile = path.join(builtLocalDirectory, compilerFilename); compileFile(tscFile, compilerSources, [builtLocalDirectory, copyright].concat(compilerSources), [copyright], /*useBuiltCompiler:*/ false); var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js"); +var nodePackageFile = path.join(builtLocalDirectory, "typescript.js"); compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].concat(servicesSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, @@ -331,7 +332,10 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca /*outDir*/ undefined, /*preserveConstEnums*/ true, /*keepComments*/ false, - /*noResolve*/ false); + /*noResolve*/ false, + /*callback*/ function () { + jake.cpR(servicesFile, nodePackageFile, {silent: true}); + }); var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts"); var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts"); @@ -425,7 +429,7 @@ task("generate-spec", [specMd]) // Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory desc("Makes a new LKG out of the built js files"); task("LKG", ["clean", "release", "local"].concat(libraryTargets), function() { - var expectedFiles = [tscFile, servicesFile, nodeDefinitionsFile, standaloneDefinitionsFile, internalNodeDefinitionsFile, internalStandaloneDefinitionsFile].concat(libraryTargets); + var expectedFiles = [tscFile, servicesFile, nodePackageFile, nodeDefinitionsFile, standaloneDefinitionsFile, internalNodeDefinitionsFile, internalStandaloneDefinitionsFile].concat(libraryTargets); var missingFiles = expectedFiles.filter(function (f) { return !fs.existsSync(f); }); diff --git a/package.json b/package.json index 2bd89706606..94b5435be19 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "url": "https://github.com/Microsoft/TypeScript.git" }, "preferGlobal": true, - "main": "./bin/typescriptServices.js", + "main": "./bin/typescript.js", "bin": { "tsc": "./bin/tsc" },