Skip to content
This repository has been archived by the owner on May 21, 2021. It is now read-only.

Commit

Permalink
feat(api): document and export libnpm api
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Aug 31, 2018
1 parent 510444e commit f85f8f8
Show file tree
Hide file tree
Showing 4 changed files with 1,464 additions and 1,437 deletions.
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# libnpm [![npm version](https://img.shields.io/npm/v/libnpm.svg)](https://npm.im/libnpm) [![license](https://img.shields.io/npm/l/libnpm.svg)](https://npm.im/libnpm) [![Travis](https://img.shields.io/travis/npm/libnpm.svg)](https://travis-ci.org/npm/libnpm) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/npm/libnpm?svg=true)](https://ci.appveyor.com/project/npm/libnpm) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpm/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpm?branch=latest)
# libnpm

[`libnpm`](https://github.com/npm/libnpm) is the programmatic API for npm.

Expand All @@ -11,12 +11,35 @@
* [Example](#example)
* [Features](#features)
* [API](#api)
* Fetching Packages and Their Info
* [`manifest`](https://www.npmjs.com/package/pacote#manifest)
* [`packument`](https://www.npmjs.com/package/pacote#packument)
* [`tarball`](https://www.npmjs.com/package/pacote#tarball)
* [`extract`](https://www.npmjs.com/package/pacote#extract)
* [`search`](https://npm.im/libnpmsearch)
* Package-related Registry APIs
* [`publish`]()
* [`unpublish`](#unpublish)
* [`access`](https://npm.im/libnpmaccess)
* Account-related Registry APIs
* [`login`](https://www.npmjs.com/package/npm-profile#login)
* [`adduser`](https://www.npmjs.com/package/npm-profile#adduser)
* [`profile`](https://npm.im/npm-profile)
* [`hook`](https://npm.im/libnpmhook)
* [`team`](https://npm.im/libnpmteam)
* [`org`](https://npm.im/libnpmorg)
* Miscellaneous
* [`runScript`](https://www.npmjs.com/package/npm-lifecycle)
* [`fetch`](https://npm.im/npm-registry-fetch) (plain ol' client for registry interaction)

### Example

```javascript
await libnpm.manifest('libnpm') // => Manifest { name: 'libnpm', ... }
```

### Features

### API

This package re-exports the APIs from other packages for convenience. Refer to
the [table of contents](#table-of-contents) for detailed documentation on each
individual exported API.
18 changes: 15 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
'use strict'

module.exports = {
package: require('pacote'),
manifest: require('pacote').manifest,
tarball: require('pacote').tarball,
extract: require('pacote').extract,
packument: require('pacote').packument,
hook: require('libnpmhook'),
ci: require('libcipm'),
config: require('figgy-pudding')
access: require('libnpmaccess'),
search: require('libnpmsearch'),
team: require('libnpmteam'),
org: require('libnpmorg'),
fetch: require('npm-registry-fetch'),
login: require('npm-profile').login,
adduser: require('npm-profile').adduser,
profile: require('npm-profile'),
publish: require('libnpmpublish').publish,
unpublish: require('libnpmpublish').unpublish,
runScript: require('npm-lifecycle')
}
Loading

0 comments on commit f85f8f8

Please sign in to comment.