Updated Branches:
  refs/heads/master f60a0cd8d -> e9fa1f05a

[CB-4564]Only alow .js files into frameworkModules

  Reviewed By: Bryan Higgins <[email protected]>
  Tested By: Tracy Li <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/e9fa1f05
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/e9fa1f05
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/e9fa1f05

Branch: refs/heads/master
Commit: e9fa1f05a1c3d36b207a9c74a84a75d6f6b899b6
Parents: f60a0cd
Author: DanielAudino <[email protected]>
Authored: Wed Aug 7 11:45:13 2013 -0400
Committer: Jeffrey Heifetz <[email protected]>
Committed: Wed Aug 28 11:44:08 2013 -0400

----------------------------------------------------------------------
 blackberry10/bin/templates/project/cordova/lib/file-manager.js | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/e9fa1f05/blackberry10/bin/templates/project/cordova/lib/file-manager.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/cordova/lib/file-manager.js 
b/blackberry10/bin/templates/project/cordova/lib/file-manager.js
index 1ce0cf3..10e27d0 100755
--- a/blackberry10/bin/templates/project/cordova/lib/file-manager.js
+++ b/blackberry10/bin/templates/project/cordova/lib/file-manager.js
@@ -102,16 +102,14 @@ function getModulesArray(dest, files, baseDir) {
         EXCLUDE_FILES = ["client.js", "manifest.json"];
 
     function isExcluded(file) {
-        return EXCLUDE_FILES.some(function (element) {
-            return path.basename(file) === element;
-        });
+        return EXCLUDE_FILES.indexOf(path.basename(file)) !== -1 || 
!file.match(/\.(js|json)$/);
     }
 
     files.forEach(function (file) {
         file = path.resolve(baseDir, file);
 
         if (!fs.statSync(file).isDirectory()) {
-            if (baseDir !== dest.EXT || !isExcluded(file)) {
+            if (baseDir !== dest.EXT && !isExcluded(file)) {
                 modulesList.push({name: 
path.relative(path.normalize(dest.CHROME), file).replace(/\\/g, "/"), file: 
file});
             }
         }

Reply via email to