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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ut-storybook

v8.3.2

Published

Shared storybook code

Downloads

2

Readme

UT Storybook

This module is intended to be installed globally and used through the CLI or the npm scripts. It includes common Storybook configuration for use by UT modules during development and build.

CLI

Usage: ut-storybook [options] [command]

Options:
  -h, --help      display help for command

Commands:
  start           Start the storybook
  build           Build the storybook
  publish         Publish the storybook (at chromatic.com)
  help [command]  display help for command

npm scripts

A common pattern is to include ut-storybook calls in these scripts in the package.json file:

{
  "scripts": {
    "storybook": "ut-storybook start -p 6006 --ci",
    "version": "node build && ut-storybook build && ut-storybook publish && git add handlers.d.ts && ut-version",
    "review": "node build && ut-storybook build && ut-storybook publish"
  }
}

Configuration

Put a file named .ut_portal_devrc in one of the standard rc places to configure proxying of storybook requests to a local or other backend.

Example:

proxy:
    /rpc/card:
        target: https://example.com
        logLevel: debug
        changeOrigin: true
        headers:
            Authorization: Bearer eyJra...
    /rpc:
        target: http://localhost:8090
        logLevel: debug
        changeOrigin: true
        headers:
            Authorization: Bearer eyJra...
    /api:
        target: http://localhost:8090
        logLevel: debug
        changeOrigin: true
    /aa:
        target: https://example.com
        logLevel: debug
        changeOrigin: true
        headers:
            cookie: ut-bus-asset=eyJra...

To make use of a real back end, you need to turn off using mocks in portal/config.js (set storybook.backend.mock to false)

The two main use cases for proxying are:

  1. If you use a backend API, which is already functional and deployed somewhere, you can point to it and not run a local back end.
  2. If you are still developing the back end, point this file to localhost and run the back end separately to the storybook.

If you are interested in how this is implemented or for advanced usage, look here: .storybook/middleware.js