Skip to content

Commit

Permalink
Ignore node_modules when looking for PHP code.
Browse files Browse the repository at this point in the history
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 df192c5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
5 changes: 0 additions & 5 deletions app/config/core.php
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions cake/libs/configure.php
Expand Up @@ -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;
Expand Down

0 comments on commit df192c5

Please sign in to comment.