code: function defaultTarget(parentId) {
      var paths = [], targetDir = process.cwd(), len, target;
  
      function pushTargets(p) {
          if (p) {
              paths.push(toPath(path.dirname(p), 'lib'));
              paths.push(toPath(path.dirname(p), 'src'));
          }
      }
  
      pushTargets(parentId);
      pushTargets(grandparentDir());
  
      len = paths.length;
      for (var i = 0; i < len; i++) {
          target = paths[i];
          try {
              if (fs.statSync(target).isDirectory()) {
                  targetDir = target;
                  break;
              }
          } catch (e) {
              // no path
          }
      }
  
      return targetDir;
  }
docs: Build and return the default target directory to expose
  by determining the first directory that exists in the
  following order:
  `dirname(parentId) + /lib`
  `dirname(parentId) + /src`
  `dirname(grandparentDir())/lib`
  `dirname(grandparentDir())/src`
  `process.cwd()`
  
  @param {String} parentId The path of the requiring module.
  @returns {String} The default target dir to expose.
  @api private