squash-me: remove unnecessary (and very naughty) chdir()
call
This commit is contained in:
parent
9d5f760597
commit
a4693ef679
@ -1,4 +1,5 @@
|
|||||||
var ts = require('typescript');
|
var ts = require('typescript');
|
||||||
|
var path = require('canonical-path');
|
||||||
|
|
||||||
module.exports = function tsParser(createCompilerHost, log) {
|
module.exports = function tsParser(createCompilerHost, log) {
|
||||||
|
|
||||||
@ -9,9 +10,9 @@ module.exports = function tsParser(createCompilerHost, log) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
parse: function(fileNames, baseDir) {
|
parse: function(fileNames, baseDir) {
|
||||||
// This is the easiest way I could find to ensure that we loaded
|
fileNames = fileNames.map(function(fileName) {
|
||||||
// modules with paths relative to the baseDir
|
return path.resolve(baseDir, fileName);
|
||||||
process.chdir(baseDir);
|
});
|
||||||
|
|
||||||
// "Compile" a program from the given module filenames, to get hold of a
|
// "Compile" a program from the given module filenames, to get hold of a
|
||||||
// typeChecker that can be used to interrogate the modules, exports and so on.
|
// typeChecker that can be used to interrogate the modules, exports and so on.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user