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

@cooperco/cooper-component-library

v0.1.64

Published

A Vue 3 component library built with TypeScript, Vite, and Tailwind CSS. Published as `@cooperco/cooper-component-library` and designed for integration with Contentful CMS via GraphQL.

Readme

Cooper Component Library

A Vue 3 component library built with TypeScript, Vite, and Tailwind CSS. Published as @cooperco/cooper-component-library and designed for integration with Contentful CMS via GraphQL.

Tech Stack

  • Vue 3.5+ - Composition API with <script setup>
  • TypeScript 5.3+ - Strict mode enabled
  • Tailwind CSS 3.4+ - Utility-first styling
  • Vite 5.2+ - Library build mode
  • Storybook 8.2+ - Component documentation
  • GraphQL - Contentful CMS integration
  • pnpm - Package manager

Recommended IDE Setup

Development

# Install dependencies
pnpm install

# Start Storybook dev server
pnpm run dev

# Run linter
pnpm run lint

# Fix linting issues
pnpm run lint:fix

# Type check
pnpm run check-types

Testing Locally

To test the component library in a consuming project before publishing:

# 1. Build and pack the library
pnpm run local-test

This creates a .tgz file in the root directory (e.g., cooperco-cooper-component-library-0.1.61.tgz)

# 2. In the consuming project, install the local package
pnpm add /path/to/cooperco-cooper-component-library-0.1.61.tgz

This allows you to test changes locally before publishing to npm.

Building and Publishing

The build and publish process needs to happen manually when changes are merged to main:

Workflow

  1. Merge to main - Merge your feature branch to main
  2. Patch version - Update version number using npm version patch (or minor/major)
  3. Publish - Run npm publish to publish to npm registry
  4. Push - Push changes and tags to GitHub

Build Process

When you run pnpm run build, the following happens in order:

  1. build:types - Compiles Vue component TypeScript definitions
  2. build:cms - Compiles GraphQL queries for Contentful
  3. vite build - Builds the component library bundle

All build artifacts are output to the dist/ directory.

Package Exports

The package exports multiple entry points:

  • Components: @cooperco/cooper-component-library - Main component library
  • Styles: @cooperco/cooper-component-library/css/main.css - Main styles
  • Theme: @cooperco/cooper-component-library/css/theme.css - Theme variables
  • Queries: @cooperco/cooper-component-library/cms/contentful/graphql - GraphQL queries

Project Structure

├── src/
│   ├── components/          # Vue components
│   │   ├── ComponentName/
│   │   │   ├── ComponentName.vue
│   │   │   └── ComponentName.ts
│   │   ├── components.ts    # Component exports
│   │   └── types.ts         # Type exports
│   ├── config/              # Configuration (color palettes, passthroughs)
│   └── utils/               # Utility functions
├── cms/
│   └── contentful/
│       └── queries/         # GraphQL queries (see cms/contentful/queries/README.md)
├── .storybook/              # Storybook configuration
│   └── components/          # Component stories
└── dist/                    # Build output (generated)

Documentation

TODO Issues

  • There are many places where class is not recognized by TypeScript. Examples are "start"/"end" in ContainerModule. This is because we are not defining class on the component types. Defining them explicitly overrides the default Attribute Inheritance behavior of Vue. Need to find a way to get around this