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 11'use strict' ;
22var path = require ( 'path' ) ;
3+ var fs = require ( 'fs' ) ;
34
45var pathToApp = path . resolve ( './' ) ;
5- var parentFolderName = path . basename ( path . resolve ( '..' ) ) ;
66global . pathToApp = pathToApp ;
77
88var loadOptions = require ( './core/loadOptions' ) ;
99
10+ // NPM 3 compatibility fix
1011var getLoaderPackageName = function ( ) {
1112 var packageName ;
13+ var parentFolderName = path . basename ( path . resolve ( '..' ) ) ;
1214 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 ) {
1418 packageName = 'load-grunt-parent-tasks' ;
1519 } else {
1620 packageName = 'load-grunt-tasks' ;
1721 }
22+
1823 return packageName ;
1924} ;
2025
You can’t perform that action at this time.
0 commit comments