brush_cli
Version:
A tool for creating and developing cmos PC Framework project.
17 lines (15 loc) • 388 B
JavaScript
// 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)
process.exit()
} catch (e) {
process.send(e)
process.exit(1)
}