UNPKG

378 BJavaScriptView Raw
1// parsing is slow and blocking right now
2// so we do it in a separate process
3var fs = require('fs'),
4 parser = require('./parser/pbxproj'),
5 path = process.argv[2],
6 fileContents, obj;
7
8try {
9 fileContents = fs.readFileSync(path, 'utf-8');
10 obj = parser.parse(fileContents);
11 process.send(obj);
12} catch (e) {
13 process.send(e);
14 process.exitCode = 1;
15}