|
|
|
@ -5,6 +5,7 @@
|
|
|
|
|
|
|
|
|
|
const path = require('path');
|
|
|
|
|
const fs = require('fs');
|
|
|
|
|
const child_process = require('child_process');
|
|
|
|
|
|
|
|
|
|
const TYPESCRIPT_LIB_SOURCE = path.join(__dirname, '../node_modules/typescript/lib');
|
|
|
|
|
const TYPESCRIPT_LIB_DESTINATION = path.join(__dirname, '../src/lib');
|
|
|
|
@ -17,6 +18,13 @@ const TYPESCRIPT_LIB_DESTINATION = path.join(__dirname, '../src/lib');
|
|
|
|
|
}
|
|
|
|
|
importLibs();
|
|
|
|
|
|
|
|
|
|
const npmLsOutput = JSON.parse(child_process.execSync("npm ls typescript --depth=0 --json=true").toString());
|
|
|
|
|
const typeScriptDependencyVersion = npmLsOutput.dependencies.typescript.version;
|
|
|
|
|
|
|
|
|
|
fs.writeFileSync(path.join(TYPESCRIPT_LIB_DESTINATION, 'typescriptServicesMetadata.ts'),
|
|
|
|
|
`export const typeScriptVersion = "${typeScriptDependencyVersion}";
|
|
|
|
|
`);
|
|
|
|
|
|
|
|
|
|
var tsServices = fs.readFileSync(path.join(TYPESCRIPT_LIB_SOURCE, 'typescriptServices.js')).toString();
|
|
|
|
|
|
|
|
|
|
// Ensure we never run into the node system...
|
|
|
|
|