@@ -2,6 +2,9 @@ var $path = require('path'),
2
2
util = require ( 'util' ) ,
3
3
M_EXTENSION = / [ . ] m $ / , SOURCE_FILE = 'sourcecode.c.objc' ,
4
4
H_EXTENSION = / [ . ] h $ / , HEADER_FILE = 'sourcecode.c.h' ,
5
+ MM_EXTENSION = / [ . ] m m $ / , MM_SOURCE_FILE = 'sourcecode.cpp.objcpp' ,
6
+ HPP_EXTENSION = / [ . ] ( h p p | h x x | h \+ \+ | h h ) $ / , CPP_HEADER_FILE = 'sourcecode.cpp.h' ,
7
+ CPP_EXTENSION = / [ . ] ( c p p | c x x | c \+ \+ | c c ) $ / , CPP_SOURCE_FILE = 'sourcecode.cpp.cpp' ,
5
8
BUNDLE_EXTENSION = / [ . ] b u n d l e $ / , BUNDLE = '"wrapper.plug-in"' ,
6
9
XIB_EXTENSION = / [ . ] x i b $ / , XIB_FILE = 'file.xib' ,
7
10
DYLIB_EXTENSION = / [ . ] d y l i b $ / , DYLIB = '"compiled.mach-o.dylib"' ,
@@ -28,9 +31,18 @@ function detectLastType(path) {
28
31
if ( M_EXTENSION . test ( path ) )
29
32
return SOURCE_FILE ;
30
33
34
+ if ( MM_EXTENSION . test ( path ) )
35
+ return MM_SOURCE_FILE ;
36
+
31
37
if ( H_EXTENSION . test ( path ) )
32
38
return HEADER_FILE ;
33
39
40
+ if ( HPP_EXTENSION . test ( path ) )
41
+ return CPP_HEADER_FILE ;
42
+
43
+ if ( CPP_EXTENSION . test ( path ) )
44
+ return CPP_SOURCE_FILE ;
45
+
34
46
if ( BUNDLE_EXTENSION . test ( path ) )
35
47
return BUNDLE ;
36
48
@@ -45,10 +57,10 @@ function detectLastType(path) {
45
57
46
58
if ( ARCHIVE_EXTENSION . test ( path ) )
47
59
return ARCHIVE ;
48
-
60
+
49
61
if ( PNG_EXTENSION . test ( path ) )
50
62
return PNG_IMAGE ;
51
-
63
+
52
64
// dunno
53
65
return 'unknown' ;
54
66
}
@@ -105,7 +117,7 @@ function pbxFile(filepath, opt) {
105
117
this . sourceTree = opt . sourceTree || defaultSourceTree ( this ) ;
106
118
this . fileEncoding = opt . fileEncoding || fileEncoding ( this ) ;
107
119
108
- if ( opt . weak && opt . weak === true )
120
+ if ( opt . weak && opt . weak === true )
109
121
this . settings = { ATTRIBUTES : [ 'Weak' ] } ;
110
122
111
123
if ( opt . compilerFlags ) {
0 commit comments