npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ui-doc/rollup

v0.3.1

Published

Rollup plugin for UI-Doc generation.

Readme

UI-Doc rollup plugin

This plugin integrates UI-Doc into rollup.

Install

# npm
npm install --save-dev @ui-doc/rollup @ui-doc/html-renderer @highlightjs/cdn-assets

# yarn
yarn add --dev @ui-doc/rollup @ui-doc/html-renderer @highlightjs/cdn-assets

# pnpm
pnpm install --save-dev @ui-doc/rollup @ui-doc/html-renderer @highlightjs/cdn-assets

Setup

import uidoc from '@ui-doc/rollup'
import postcss from 'rollup-plugin-postcss'

export default [
  {
    input: {
      app: 'css/index.css',
    },
    output: {
      dir: 'dist',
    },
    plugins: [
      postcss({
        extract: 'app.css',
      }),
      uidoc({
        settings: {
          generate: {
            logo: () => 'Rollup',
          },
          texts: {
            title: 'Rollup Example',
          },
        },
        source: ['css/**/*.css'],
        assets: {
          example: {
            name: 'app',
            input: true,
          },
        },
      }),
    ],
  },
]

Options

| Name | Required | Type | Description | | --- | --- | --- | --- | | blockParser | no | BlockParser | Give a custom BlockParser instance to change the block parsing. | | renderer | no | Renderer | Instance of renderer. Per default a instance of @ui-doc/html-renderer will be created. | | source | yes | string[] | List of glob patterns to find source files. Please see picomatch how to define patterns. | | outputDir | no | string | Change output directory to create the UI-Doc in a subfolder of your application. | | templatePath | no | string | When using the default renderer you can override default templates from the renderer or add custom templates for generation. | | output | no | object | Change output settings | | output.dir | no | string | path where you wan't to put the ui-doc. Will be relativ to rollup's output dir | | output.baseUri | no | string | Change the base URI of you UI-Kit useful if you wan't to place the UI-Doc somewhere else then the output folder. If output.dir is given and no output.baseUri the dir will be used. You can give '.' so all URLs will be relative. | | settings | no | object | UI-Doc specific settings. | | settings.generate | no | object | UI-Doc core generate setting | | settings.texts | no | object | UI-Doc core texts setting | | assets | no | object | Change asset usage | | assets.static | no | string | ive a static assets folder (path relativ to your working directory), files and sub folders will be copied to the UI-Doc output dir. | | assets.styleAsset | no | false / string | With false prevent including the UI-Doc style. With string change the included style name. | | assets.highlightStyle | no | false / string | With false prevent including highlight.js style. With string change name of included style. | | assets.highlightTheme | no | string | Change highlight.js style theme (default is default). Please look into the highlight.js repository to see available themes. | | assets.highlightScript | no | false / string | With false prevent including highlight.js. With string change name of included script. | | assets.page | no | AssetOption[] | Include custom scripts and styles for UI-Doc pages | | assets.example | no | AssetOption[] | Include custom scripts and styles for UI-Doc examples |

export interface AssetOption {
  name: string | (() => string) // name or relative file name of the asset
  fromInput?: boolean | ((asset: AssetResolved) => boolean) // try to get asset information from rollup's input option. Eg. if you configure the input as object you can give the asset key as name and UI-Doc will try to resolve the asset file for you
  file?: string | (() => string) // load asset from file
  dependency?: string | (() => string) // load the asset from dependency
  source?: string | Uint8Array | (() => string) // give the asset source directly
  attrs?: Record<string, string> // give asset html attributes that should be rendered into the output
}

Upcoming Features

Known Issues

  • When creating assets over rollup input exclusive for UI-Doc the asset will be generated first to roleup's output directory and then be copied to the UI-Doc output.