From d07a2774a31414b617560280e1613361d595d8ca Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Tue, 27 Oct 2015 13:48:37 -0700 Subject: [PATCH] const enum fixing in postprocess step --- Jakefile.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jakefile.js b/Jakefile.js index 23720a2e7c2..bff7c118697 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -444,6 +444,8 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca // Stanalone/web definition file using global 'ts' namespace jake.cpR(standaloneDefinitionsFile, nodeDefinitionsFile, {silent: true}); var definitionFileContents = fs.readFileSync(nodeDefinitionsFile).toString(); + definitionFileContents = definitionFileContents.replace(/^(\s*)(export )?const enum (\S+) {(\s*)$/gm, '$1$2enum $3 {$4'); + fs.writeFileSync(standaloneDefinitionsFile, definitionFileContents); // Official node package definition file, pointed to by 'typings' in package.json // Created by appending 'export = ts;' at the end of the standalone file to turn it into an external module