Skip to content

Commit 67feda8

Browse files
n1ru4ljanpio
authored andcommitted
docs(readme): highlight code example (apache#25)
1 parent d043fdb commit 67feda8

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,23 @@ Allows you to edit xcodeproject files and write them back out.
2929

3030
## Example
3131

32-
// API is a bit wonky right now
33-
var xcode = require('xcode'),
34-
fs = require('fs'),
35-
projectPath = 'myproject.xcodeproj/project.pbxproj',
36-
myProj = xcode.project(projectPath);
32+
```js
33+
// API is a bit wonky right now
34+
var xcode = require('xcode'),
35+
fs = require('fs'),
36+
projectPath = 'myproject.xcodeproj/project.pbxproj',
37+
myProj = xcode.project(projectPath);
3738

38-
// parsing is async, in a different process
39-
myProj.parse(function (err) {
40-
myProj.addHeaderFile('foo.h');
41-
myProj.addSourceFile('foo.m');
42-
myProj.addFramework('FooKit.framework');
43-
44-
fs.writeFileSync(projectPath, myProj.writeSync());
45-
console.log('new project written');
46-
});
39+
// parsing is async, in a different process
40+
myProj.parse(function (err) {
41+
myProj.addHeaderFile('foo.h');
42+
myProj.addSourceFile('foo.m');
43+
myProj.addFramework('FooKit.framework');
44+
45+
fs.writeFileSync(projectPath, myProj.writeSync());
46+
console.log('new project written');
47+
});
48+
```
4749

4850
## Working on the parser
4951

0 commit comments

Comments
 (0)