You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2018/12/07 15:13:32 UTC

[cordova-node-xcode] branch master updated: docs(readme): highlight code example (#25)

This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-node-xcode.git


The following commit(s) were added to refs/heads/master by this push:
     new 67feda8  docs(readme): highlight code example (#25)
67feda8 is described below

commit 67feda8bc70bb616fcba268af754a803d1b67f99
Author: Laurin Quast <la...@googlemail.com>
AuthorDate: Fri Dec 7 16:13:28 2018 +0100

    docs(readme): highlight code example (#25)
---
 README.md | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/README.md b/README.md
index 119df35..32edcdd 100644
--- a/README.md
+++ b/README.md
@@ -29,21 +29,23 @@ Allows you to edit xcodeproject files and write them back out.
 
 ## Example
 
-    // API is a bit wonky right now
-    var xcode = require('xcode'),
-        fs = require('fs'),
-        projectPath = 'myproject.xcodeproj/project.pbxproj',
-        myProj = xcode.project(projectPath);
+```js
+// API is a bit wonky right now
+var xcode = require('xcode'),
+    fs = require('fs'),
+    projectPath = 'myproject.xcodeproj/project.pbxproj',
+    myProj = xcode.project(projectPath);
 
-    // parsing is async, in a different process
-    myProj.parse(function (err) {
-        myProj.addHeaderFile('foo.h');
-        myProj.addSourceFile('foo.m');
-        myProj.addFramework('FooKit.framework');
-        
-        fs.writeFileSync(projectPath, myProj.writeSync());
-        console.log('new project written');
-    });
+// parsing is async, in a different process
+myProj.parse(function (err) {
+    myProj.addHeaderFile('foo.h');
+    myProj.addSourceFile('foo.m');
+    myProj.addFramework('FooKit.framework');
+   
+    fs.writeFileSync(projectPath, myProj.writeSync());
+    console.log('new project written');
+});
+```
 
 ## Working on the parser
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org