astro-npm-loader

0.1.1 • Public • Published

Astro NPM Loader

Load information about NPM packages into a content collection

How To

// src/content/config.ts
import { npmLoader } from 'astro-npm-loader';
import { defineCollection } from 'astro:content';

const npm = defineCollection({
    loader: npmLoader({ username: '$$your_username$$' }),
});

export const collections = {
    npm
};

Users tested with

Found a bug? Create an issue with the username and we'll get to fixing it!

TODO:

  • [ ] Include download stats
  • [x] Test against users with multiple pages of packages
  • [ ] Tests?
  • [ ] Improve typing

Package Sidebar

Install

npm i astro-npm-loader

Weekly Downloads

14

Version

0.1.1

License

MIT

Unpacked Size

4.34 kB

Total Files

3

Last publish

Collaborators

  • gingerchew