New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

astro-npm-loader

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astro-npm-loader

Load Data from NPM packages into Content Collections

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
0
Created
Source

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

  • gingerchew
  • mathias

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

TODO:

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

Keywords

withastro

FAQs

Package last updated on 13 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts