mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-24 10:01:48 -04:00
42 lines
1.0 KiB
Markdown
42 lines
1.0 KiB
Markdown
# @pnpm/git-resolver
|
|
|
|
> Resolver for git-hosted packages
|
|
|
|
<!--@shields('npm')-->
|
|
[](https://www.npmjs.com/package/@pnpm/git-resolver)
|
|
<!--/@-->
|
|
|
|
## Installation
|
|
|
|
```
|
|
<pnpm|npm|yarn> add @pnpm/git-resolver
|
|
```
|
|
|
|
## Usage
|
|
|
|
<!--@example('./example.js')-->
|
|
```js
|
|
'use strict'
|
|
const createResolveFromNpm = require('@pnpm/git-resolver').default
|
|
|
|
const resolveFromNpm = createResolveFromNpm({})
|
|
|
|
resolveFromNpm({
|
|
pref: 'kevva/is-negative#16fd36fe96106175d02d066171c44e2ff83bc055'
|
|
})
|
|
.then(resolveResult => console.log(JSON.stringify(resolveResult, null, 2)))
|
|
//> {
|
|
// "id": "github.com/kevva/is-negative/16fd36fe96106175d02d066171c44e2ff83bc055",
|
|
// "normalizedPref": "github:kevva/is-negative#16fd36fe96106175d02d066171c44e2ff83bc055",
|
|
// "resolution": {
|
|
// "tarball": "https://codeload.github.com/kevva/is-negative/tar.gz/16fd36fe96106175d02d066171c44e2ff83bc055"
|
|
// },
|
|
// "resolvedVia": "git-repository"
|
|
// }
|
|
```
|
|
<!--/@-->
|
|
|
|
## License
|
|
|
|
MIT © [Zoltan Kochan](https://www.kochan.io/)
|