aboutsummaryrefslogtreecommitdiff
path: root/cordova/node_modules/xcode/lib/parseJob.js
blob: 9d6bffad2398318a7212f8358638cf0c29f8bd1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// parsing is slow and blocking right now
// so we do it in a separate process
var fs = require('fs'),
    parser = require('./parser/pbxproj'),
    path = process.argv[2],
    fileContents, obj;

try {
    fileContents = fs.readFileSync(path, 'utf-8');
    obj = parser.parse(fileContents);
    process.send(obj);
} catch (e) {
    process.send(e);
    process.exitCode = 1;
}