Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dgw/sopel-npm
Sopel plugin to handle NPM links/searches
https://github.com/dgw/sopel-npm
Last synced: about 1 month ago
JSON representation
Sopel plugin to handle NPM links/searches
- Host: GitHub
- URL: https://github.com/dgw/sopel-npm
- Owner: dgw
- License: other
- Created: 2024-09-14T19:58:59.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-09-14T22:45:00.000Z (2 months ago)
- Last Synced: 2024-09-15T23:07:13.077Z (2 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS
- License: COPYING
Awesome Lists containing this project
README
# sopel-npm
Sopel plugin to handle NPM links/searches
## Installing
Releases are hosted on PyPI, so after installing Sopel, all you need is `pip`:
```shell
$ pip install sopel-npm
```## Using
`sopel-npm` offers two main features: link handling, and a search command.
### Link handling
If someone posts a link to a package on npmjs.com, `sopel-npm` should emit an
overview of that package's latest version:```
https://www.npmjs.com/package/plyr
[npm] [email protected] | Published by sam_potts | MIT license | Unpacked
size: 5.1 MiB in 124 files | A simple, accessible and customizable
HTML5, YouTube and Vimeo media player
```Links directly to a specific package version will show information for that
release instead:```
https://www.npmjs.com/package/plyr/v/2.0.18
[npm] [email protected] | Published by sampotts | MIT license | A simple,
accessible and customizable HTML5, YouTube and Vimeo media player
```### `.npm` search command
Use `.npm keywords here` and `sopel-npm` will show details for the best match
as returned by the NPM registry's search engine:```
.npm best vue plugin
[npm] [email protected] | Published by lisilinhart | MIT
license | Unpacked size: 47.4 KiB in 8 files | ESLint plugin for Pinia
best practices | https://www.npmjs.com/package/eslint-plugin-pinia
```This feature will always show details for the latest version of the matching
package, if any.### Robustness
NPM metadata has evolved over time, and the registry doesn't normalize metadata
for old releases. `sopel-npm` does its best to cope with missing data fields and
return _something_ useful, even if it's not complete.[Bug reports][issue-tracker] or [pull requests][pull-requests] are welcome if
you run into a situation that this plugin can't handle gracefully![issue-tracker]: https://github.com/dgw/sopel-npm/issues
[pull-requests]: https://github.com/dgw/sopel-npm/pulls