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

@comparae/ui

v0.5.0

Published

This project was bootstrapped with [TSDX](https://github.com/palmerhq/tsdx)

Downloads

11

Readme

Comparaê UI components

This project was bootstrapped with TSDX

If you’re new to TypeScript and React, checkout this handy cheatsheet

Commands

TSDX scaffolds your new library inside /src.

The recommended workflow for development is to start Gatsby with:

yarn start

This will run the Docz styleguide where you can develop components in isolation. For each component you must create a README.mdx file as follow:

---
name: Button
route: /button
menu: Components
---

import { Playground, Props } from 'docz';
import { Button } from './Button.tsx';

# Button

Basic Button component

## Usage

<Playground>
  <Button color="primary">Test</Button>
</Playground>

## Props

<Props of={Button} />

To do a one-off build, use yarn build.

To run tests, use yarn test.

Jest

Jest tests are set up to run with yarn test. This runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.

Setup Files

This is the folder structure we set up for you:

/src
  /Button         # Basic component structure
    Button.tsx
    Button.test.tsx
    index.ts
    README.mdx
  index.tsx
.gitignore
.prettierrc
doczrc.js
gatsby-config.js
LICENSE.md
package.json
README.md
tsconfig.json
yarn.lock

React Testing Library

We do not set up react-testing-library for you yet, we welcome contributions and documentation on this.

Rollup

TSDX uses Rollup v1.x as a bundler and generates multiple rollup configs for various module formats and build settings. See Optimizations for details.

TypeScript

tsconfig.json is set up to interpret dom and esnext types, as well as react for jsx. Adjust according to your needs.

Continuous Integration

Travis

to be completed

Optimizations

Please see the main tsdx optimizations docs. In particular, know that you can take advantage of development-only optimizations:

// ./types/index.d.ts
declare var __DEV__: boolean;

// inside your code...
if (__DEV__) {
  console.log('foo');
}

You can also choose to install and use invariant and warning functions.

Module Formats

CJS, ESModules, and UMD module formats are supported.

The appropriate paths are configured in package.json and dist/index.js accordingly. Please report if any issues are found.

Named Exports

Per Palmer Group guidelines, always use named exports. Code split inside your React app instead of your React library.

Including Styles

Comparaê UI uses styled-components for styles.

Publishing to NPM

We recommend using https://github.com/sindresorhus/np.