docs: function (opts) {
      opts = opts || {}
      opts = defaults(opts, {
        nodeModulesDir: path.resolve(process.cwd(), 'node_modules'),
        package: rpkg.gen(opts.package)
      })
      fs.mkdirpSync(path.resolve(opts.nodeModulesDir, opts.package.name))
      fs.writeFileSync(
        path.resolve(opts.nodeModulesDir, opts.package.name, 'package.json'),
        JSON.stringify(opts.package, null, 2)
      )
      if (opts.targetPackage) {
        var key = opts.isDev ? 'devDependencies' : 'dependencies'
        var targetPackage = JSON.parse(fs.readFileSync(opts.targetPackage))
        targetPackage[key] = targetPackage[key] || {}
        targetPackage[key][opts.package.name] = opts.package.version
        fs.writeFileSync(opts.targetPackage, JSON.stringify(targetPackage, null, 2))
      }
      return opts.package
    }