File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed
packages/angular_devkit/build_angular/src/utils Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -9,34 +9,6 @@ import { existsSync } from 'fs';
9
9
import * as path from 'path' ;
10
10
import { isDirectory } from './is-directory' ;
11
11
12
- export function findUp ( names : string | string [ ] , from : string , stopOnNodeModules = false ) : string | null {
13
- if ( ! Array . isArray ( names ) ) {
14
- names = [ names ] ;
15
- }
16
- const root = path . parse ( from ) . root ;
17
-
18
- let currentDir = from ;
19
- while ( currentDir && currentDir !== root ) {
20
- for ( const name of names ) {
21
- const p = path . join ( currentDir , name ) ;
22
- if ( existsSync ( p ) ) {
23
- return p ;
24
- }
25
- }
26
-
27
- if ( stopOnNodeModules ) {
28
- const nodeModuleP = path . join ( currentDir , 'node_modules' ) ;
29
- if ( existsSync ( nodeModuleP ) ) {
30
- return null ;
31
- }
32
- }
33
-
34
- currentDir = path . dirname ( currentDir ) ;
35
- }
36
-
37
- return null ;
38
- }
39
-
40
12
export function findAllNodeModules ( from : string , root ?: string ) : string [ ] {
41
13
const nodeModules : string [ ] = [ ] ;
42
14
You can’t perform that action at this time.
0 commit comments