File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
var path = require ( 'path' ) ;
3
+ var fs = require ( 'fs' ) ;
3
4
4
5
var pathToApp = path . resolve ( './' ) ;
5
- var parentFolderName = path . basename ( path . resolve ( '..' ) ) ;
6
6
global . pathToApp = pathToApp ;
7
7
8
8
var loadOptions = require ( './core/loadOptions' ) ;
9
9
10
+ // NPM 3 compatibility fix
10
11
var getLoaderPackageName = function ( ) {
11
12
var packageName ;
13
+ var parentFolderName = path . basename ( path . resolve ( '..' ) ) ;
12
14
var isSubPackage = parentFolderName === 'node_modules' ;
13
- if ( isSubPackage ) {
15
+ var isLocalDepsAvailable = fs . existsSync ( 'node_modules/grunt-autoprefixer' ) && fs . existsSync ( 'node_modules/grunt-contrib-cssmin' ) ;
16
+
17
+ if ( isSubPackage && ! isLocalDepsAvailable ) {
14
18
packageName = 'load-grunt-parent-tasks' ;
15
19
} else {
16
20
packageName = 'load-grunt-tasks' ;
17
21
}
22
+
18
23
return packageName ;
19
24
} ;
20
25
You can’t perform that action at this time.
0 commit comments