We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc56521 commit 46f89b5Copy full SHA for 46f89b5
1 file changed
lib/pbxFile.js
@@ -70,27 +70,20 @@ var FILETYPE_BY_EXTENSION = {
70
};
71
72
73
-function detectLastType(path) {
74
- if (M_EXTENSION.test(path))
75
- return SOURCE_FILE;
+function detectType(filePath) {
+ var extension = path.extname(filePath),
+ type = FILETYPE_BY_EXTENSION[extension];
76
77
- if (H_EXTENSION.test(path))
78
- return HEADER_FILE;
+ if (!type) {
+ return DEFAULT_FILETYPE;
79
+ }
80
- if (BUNDLE_EXTENSION.test(path))
81
- return BUNDLE;
+ return type;
82
+}
83
- if (XIB_EXTENSION.test(path))
84
- return XIB_FILE;
85
86
- if (FRAMEWORK_EXTENSION.test(path))
87
- return FRAMEWORK;
88
89
- if (DYLIB_EXTENSION.test(path))
90
- return DYLIB;
91
92
- if (ARCHIVE_EXTENSION.test(path))
93
- return ARCHIVE;
94
95
// dunno
96
return 'unknown';
0 commit comments