Skip to content
Permalink
Browse files

Ignore node_modules when looking for PHP code.

Revert part of the changes in 9cefd88.
A configuration this late in the 1.3 release seems a bit redundant.
However, we should ignore node_modules by default as npm is very
unlikely to be installing useful PHP code, and often installs thousands
of files.

Refs #7562
  • Loading branch information...
markstory committed Oct 31, 2015
1 parent 9cefd88 commit df192c5344ba8a4763816190caaf65ac8664593c
Showing with 1 addition and 9 deletions.
  1. +0 −5 app/config/core.php
  2. +1 −4 cake/libs/configure.php
@@ -247,11 +247,6 @@
*/
//date_default_timezone_set('UTC');
/**
* Add files or folders that should be ignored by CakePHP when scanning application folder.
*/
//Configure::write('ignorePaths', array('.svn', '.git', 'CVS', 'tests', 'templates', 'node_modules'));
/**
*
* Cache Engine Configuration
@@ -1035,10 +1035,7 @@ function __find($file, $recursive = true) {
require LIBS . 'folder.php';
}
$Folder =& new Folder();
$ignorePaths = Configure::read('ignorePaths');
if(empty($ignorePaths)) {
$ignorePaths = array('.svn', '.git', 'CVS', 'tests', 'templates');
}
$ignorePaths = array('.svn', '.git', 'CVS', 'tests', 'templates', 'node_modules');
$directories = $Folder->tree($path, $ignorePaths, 'dir');
sort($directories);
$this->__paths[$path] = $directories;

0 comments on commit df192c5

Please sign in to comment.
You can’t perform that action at this time.