Gruntfile.js
function() {
    var packageName;
    var parentFolderName = path.basename(path.resolve('..'));
    var isSubPackage = parentFolderName === 'node_modules';
    var isLocalDepsAvailable = fs.existsSync('node_modules/grunt-autoprefixer') && fs.existsSync('node_modules/grunt-contrib-cssmin');

    if (isSubPackage && !isLocalDepsAvailable) {
        packageName = 'load-grunt-parent-tasks';
    } else {
        packageName = 'load-grunt-tasks';
    }

    return packageName;
}
function() {
    var packageName;
    var parentFolderName = path.basename(path.resolve('..'));
    var isSubPackage = parentFolderName === 'node_modules';
    var isLocalDepsAvailable = fs.existsSync('node_modules/grunt-autoprefixer') && fs.existsSync('node_modules/grunt-contrib-cssmin');

    if (isSubPackage && !isLocalDepsAvailable) {
        packageName = 'load-grunt-parent-tasks';
    } else {
        packageName = 'load-grunt-tasks';
    }

    return packageName;
}
function ( ) { var packageName ; var parentFolderName = path . basename ( path . resolve ( '..' ) ) ; var isSubPackage = parentFolderName === 'node_modules' ; var isLocalDepsAvailable = fs . existsSync ( 'node_modules/grunt-autoprefixer' ) && fs . existsSync ( 'node_modules/grunt-contrib-cssmin' ) ; if ( isSubPackage && ! isLocalDepsAvailable ) { packageName = 'load-grunt-parent-tasks' ; } else { packageName = 'load-grunt-tasks' ; } return packageName ; }
NPM 3 compatibility fix
NPM 3 compatibility fix