Skip to content

Rebase origin onto master #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Sep 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
91c9791
Windows path fix
BBosman Oct 22, 2014
efdb326
XCBuildConfiguration array field replace ok
seobyeongky Mar 12, 2015
e6e9863
add test replacing field that has array case
seobyeongky Mar 19, 2015
1fd40aa
Fixes issue #44, where removeFromPbxFileReferenceSection fails to rem…
initialxy Apr 16, 2015
630d4a4
Added a unit test to verify correct source file removal from PBXFileR…
initialxy Apr 18, 2015
b5f5764
added multiple target support
ogoguel May 20, 2015
e401609
Added double quotes around COMPILER_FLAGS
zahhak May 27, 2015
0d50e0c
iojs support (v2.1.0)
peutetre May 28, 2015
b9dd025
Bumping version
May 29, 2015
e9c8bbc
Fix parser to merge properties of multiple sections with the same name
May 29, 2015
dff0aad
Fixing bug whereby parser would fail when array entry does not have a…
Jun 9, 2015
ea3acb9
Introduce a way to add Build Phases
Jun 26, 2015
19b4a77
Bumping version
Jun 26, 2015
1d45718
Fix build phase uuid being written in the PBXproject
Jun 29, 2015
e41f8e0
Introduce a way to add PBXGroups
Jun 30, 2015
9432acf
Introduce a way to add XCConfigurationLists
Jun 30, 2015
0932434
Expose PbxProject Section
Jun 30, 2015
8bb44fe
Fix AddBuildPhase able to add duplicate files
Jun 30, 2015
4888306
Implement pbxTargetByName and pbxItemByComment
Jul 1, 2015
8e3afdf
Allow setting of 'includeInIndex' and 'explicitFileType' properties
Jun 29, 2015
056f43d
Bumping version
Jul 9, 2015
a84d3e7
Introduce a way to add PBXTargetDependencies to a target
Jul 1, 2015
f5aeaa6
bumping version
Jul 13, 2015
be008f2
Change framework extension regex to verify, that the path ends with .…
Jul 31, 2015
976eca8
Implement relative to project root search paths.
e2l3n Sep 7, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,177 changes: 1,670 additions & 2,507 deletions lib/parser/pbxproj.js

Large diffs are not rendered by default.

22 changes: 18 additions & 4 deletions lib/parser/pbxproj.pegjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
{
function merge(hash, secondHash) {
secondHash = secondHash[0]
for(var i in secondHash)
hash[i] = secondHash[i]
for(var i in secondHash) {
hash[i] = merge_obj(hash[i], secondHash[i]);
}

return hash;
}

function merge_obj(obj, secondObj) {
if (!obj)
return secondObj;

for(var i in secondObj)
obj[i] = merge_obj(obj[i], secondObj[i]);

return obj;
}
}

/*
Expand Down Expand Up @@ -155,17 +166,20 @@ ArrayEntry
= SimpleArrayEntry / CommentedArrayEntry

SimpleArrayEntry
= val:Value "," { return val }
= val:Value EndArrayEntry { return val }

CommentedArrayEntry
= val:Value _ comment:InlineComment ","
= val:Value _ comment:InlineComment EndArrayEntry
{
var result = Object.create(null);
result.value = val.trim();
result.comment = comment.trim();
return result;
}

EndArrayEntry
= "," / _ &")"

/*
* Identifiers and Values
*/
Expand Down
5 changes: 3 additions & 2 deletions lib/pbxFile.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
var path = require('path'),
util = require('util'),
M_EXTENSION = /[.]m$/, SOURCE_FILE = 'sourcecode.c.objc',
H_EXTENSION = /[.]h$/, HEADER_FILE = 'sourcecode.c.h',
BUNDLE_EXTENSION = /[.]bundle$/, BUNDLE = '"wrapper.plug-in"',
XIB_EXTENSION = /[.]xib$/, XIB_FILE = 'file.xib',
DYLIB_EXTENSION = /[.]dylib$/, DYLIB = '"compiled.mach-o.dylib"',
FRAMEWORK_EXTENSION = /[.]framework/, FRAMEWORK = 'wrapper.framework',
FRAMEWORK_EXTENSION = /[.]framework$/, FRAMEWORK = 'wrapper.framework',
ARCHIVE_EXTENSION = /[.]a$/, ARCHIVE = 'archive.ar',
PNG_EXTENSION = /[.]png/, PNG_IMAGE = "image.png",
DEFAULT_SOURCE_TREE = '"<group>"',
Expand Down Expand Up @@ -97,7 +98,7 @@ function pbxFile(filepath, opt) {
if (opt.compilerFlags) {
if (!this.settings)
this.settings = {};
this.settings.COMPILER_FLAGS = opt.compilerFlags;
this.settings.COMPILER_FLAGS = util.format('"%s"', opt.compilerFlags);
}
}

Expand Down
Loading