Skip to content

Commit

Permalink
Merge branch 'master' into TSServer
Browse files Browse the repository at this point in the history
Conflicts:
	Jakefile
  • Loading branch information
mhegazy committed Feb 10, 2015
2 parents acd4914 + b277695 commit e4128af
Show file tree
Hide file tree
Showing 1,864 changed files with 101,071 additions and 16,409 deletions.
30 changes: 22 additions & 8 deletions Jakefile
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ var compilerFilename = "tsc.js";
* @param keepComments: false to compile using --removeComments
* @param callback: a function to execute after the compilation process ends
*/
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, callback) {
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, stripInternal, callback) {
file(outFile, prereqs, function() {
var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory;
var options = "--module commonjs -noImplicitAny";
Expand Down Expand Up @@ -227,6 +227,10 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
options += " -sourcemap -mapRoot file:///" + path.resolve(path.dirname(outFile));
}

if (stripInternal) {
options += " --stripInternal"
}

var cmd = host + " " + dir + compilerFilename + " " + options + " ";
cmd = cmd + sources.join(" ");
console.log(cmd + "\n");
Expand Down Expand Up @@ -333,6 +337,7 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
/*preserveConstEnums*/ true,
/*keepComments*/ false,
/*noResolve*/ false,
/*stripInternal*/ false,
/*callback*/ function () {
jake.cpR(servicesFile, nodePackageFile, {silent: true});
});
Expand All @@ -351,6 +356,7 @@ compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright
/*preserveConstEnums*/ true,
/*keepComments*/ true,
/*noResolve*/ true,
/*stripInternal*/ true,
/*callback*/ function () {
function makeDefinitionFiles(definitionsRoots, standaloneDefinitionsFile, nodeDefinitionsFile) {
// Create the standalone definition file
Expand Down Expand Up @@ -380,6 +386,10 @@ compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright
desc("Builds the full compiler and services");
task("local", ["generate-diagnostics", "lib", tscFile, servicesFile, nodeDefinitionsFile]);

// Local target to build only tsc.js
desc("Builds only the compiler");
task("tsc", ["generate-diagnostics", "lib", tscFile]);

// Local target to build the compiler and services
desc("Sets release mode flag");
task("release", function() {
Expand Down Expand Up @@ -455,14 +465,16 @@ directory(builtLocalDirectory);
var run = path.join(builtLocalDirectory, "run.js");
compileFile(run, harnessSources, [builtLocalDirectory, tscFile].concat(libraryTargets).concat(harnessSources), [], /*useBuiltCompiler:*/ true);

var internalTests = "internal/"

var localBaseline = "tests/baselines/local/";
var refBaseline = "tests/baselines/reference/";

var localRwcBaseline = "tests/baselines/rwc/local/";
var refRwcBaseline = "tests/baselines/rwc/reference/";
var localRwcBaseline = path.join(internalTests, "baselines/rwc/local");
var refRwcBaseline = path.join(internalTests, "baselines/rwc/reference");

var localTest262Baseline = "tests/baselines/test262/local/";
var refTest262Baseline = "tests/baselines/test262/reference/";
var localTest262Baseline = path.join(internalTests, "baselines/test262/local");
var refTest262Baseline = path.join(internalTests, "baselines/test262/reference");

desc("Builds the test infrastructure using the built compiler");
task("tests", ["local", run].concat(libraryTargets));
Expand Down Expand Up @@ -495,11 +507,13 @@ function cleanTestDirs() {
jake.rmRf(localBaseline);
}

// Clean the local Rwc baselines directory
// Clean the local Rwc baselines directory
if (fs.existsSync(localRwcBaseline)) {
jake.rmRf(localRwcBaseline);
}

jake.mkdirP(localRwcBaseline);
jake.mkdirP(localTest262Baseline);
jake.mkdirP(localBaseline);
}

Expand All @@ -511,8 +525,8 @@ function writeTestConfigFile(tests, testConfigFile) {
}

function deleteTemporaryProjectOutput() {
if (fs.existsSync(localBaseline + "projectOutput/")) {
jake.rmRf(localBaseline + "projectOutput/");
if (fs.existsSync(path.join(localBaseline, "projectOutput/"))) {
jake.rmRf(path.join(localBaseline, "projectOutput/"));
}
}

Expand Down
2 changes: 1 addition & 1 deletion bin/lib.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ declare module Intl {
second?: string;
timeZoneName?: string;
formatMatcher?: string;
hour12: boolean;
hour12?: boolean;
}

interface ResolvedDateTimeFormatOptions {
Expand Down
2 changes: 1 addition & 1 deletion bin/lib.dom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ declare module Intl {
second?: string;
timeZoneName?: string;
formatMatcher?: string;
hour12: boolean;
hour12?: boolean;
}

interface ResolvedDateTimeFormatOptions {
Expand Down
2 changes: 1 addition & 1 deletion bin/lib.es6.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4884,7 +4884,7 @@ declare module Intl {
second?: string;
timeZoneName?: string;
formatMatcher?: string;
hour12: boolean;
hour12?: boolean;
}

interface ResolvedDateTimeFormatOptions {
Expand Down
2 changes: 1 addition & 1 deletion bin/lib.webworker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ declare module Intl {
second?: string;
timeZoneName?: string;
formatMatcher?: string;
hour12: boolean;
hour12?: boolean;
}

interface ResolvedDateTimeFormatOptions {
Expand Down
Loading

0 comments on commit e4128af

Please sign in to comment.