Skip to content

Commit 52fa3f1

Browse files
tdermendjievKristian D. Dimitrov
authored andcommitted
feat: Add support various file extensions and export filetypes for pbxFile module
1 parent 1a410c1 commit 52fa3f1

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

lib/pbxFile.js

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,20 @@ var FILETYPE_BY_EXTENSION = {
2929
app: 'wrapper.application',
3030
appex: 'wrapper.app-extension',
3131
bundle: 'wrapper.plug-in',
32+
c: 'sourcecode.c.c',
33+
cc: 'sourcecode.cpp.cpp',
34+
cpp: 'sourcecode.cpp.cpp',
35+
cxx: 'sourcecode.cpp.cpp',
36+
'c++': 'sourcecode.cpp.cpp',
3237
dylib: 'compiled.mach-o.dylib',
3338
framework: 'wrapper.framework',
3439
h: 'sourcecode.c.h',
40+
hh: 'sourcecode.cpp.h',
41+
hpp: 'sourcecode.cpp.h',
42+
hxx: 'sourcecode.cpp.h',
43+
'h++': 'sourcecode.cpp.h',
3544
m: 'sourcecode.c.objc',
45+
mm: 'sourcecode.cpp.objcpp',
3646
markdown: 'text',
3747
mdimporter: 'wrapper.cfbundle',
3848
octest: 'wrapper.cfbundle',
@@ -57,8 +67,11 @@ var FILETYPE_BY_EXTENSION = {
5767
'wrapper.framework': 'Frameworks',
5868
'embedded.framework': 'Embed Frameworks',
5969
'sourcecode.c.h': 'Resources',
70+
'sourcecode.c.c': 'Sources',
6071
'sourcecode.c.objc': 'Sources',
61-
'sourcecode.swift': 'Sources'
72+
'sourcecode.swift': 'Sources',
73+
'sourcecode.cpp.cpp': 'Sources',
74+
'sourcecode.cpp.objcpp': 'Sources'
6275
},
6376
PATH_BY_FILETYPE = {
6477
'compiled.mach-o.dylib': 'usr/lib/',
@@ -73,7 +86,11 @@ var FILETYPE_BY_EXTENSION = {
7386
ENCODING_BY_FILETYPE = {
7487
'sourcecode.c.h': 4,
7588
'sourcecode.c.h': 4,
89+
'sourcecode.cpp.h': 4,
90+
'sourcecode.c.c': 4,
7691
'sourcecode.c.objc': 4,
92+
'sourcecode.cpp.cpp': 4,
93+
'sourcecode.cpp.objcpp': 4,
7794
'sourcecode.swift': 4,
7895
'text': 4,
7996
'text.plist.xml': 4,
@@ -231,4 +248,7 @@ function pbxFile(filepath, opt) {
231248
}
232249
}
233250

234-
module.exports = pbxFile;
251+
module.exports = {
252+
pbxFile: pbxFile,
253+
fileTypes: fileTypes
254+
}

0 commit comments

Comments
 (0)