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

@detroit-labs/klondike

v0.3.2

Published

React component library

Downloads

33

Readme

Klondike

Detroit Labs npm version styled with prettier semantic-release CircleCI

Table of Contents generated with DocToc

Setup

Install Klondike and its required peer dependencies.

yarn add @detroit-labs/klondike glamor glamorous

Wrap your <App> component in the <Provider>, so that Klondike's component styles are applied in your application.

import { Provider } from '@detroit-labs/klondike'

<Provider>
  <App />
</Provider>

Development

Commands

yarn install

This installs dependencies from NPM and should be run regularly when pulling down code from master or another branch.

yarn start

This starts the React Styleguidist server. Visit http://localhost:6060 to view the styleguide locally.

yarn commit

This commits code using the Commitizen command line tool. This is required for committing code, since the commit message format is specifically used for generating release notes and determining the next version to publish (thanks to semantic-release).

yarn build

This compiles the source code using Babel. The output directory is located at dist/ and contains the compiled JavaScript ready for consumption. The TypeScript definitions files (.d.ts) are also copied over during this process.

The .babelrc file defines a few presets and plugins that this codebase uses:

File Structure

All source code is located in the src/ directory. The file structure looks like:

src
├── Button
│   ├── Button.js
│   ├── Button.md
│   ├── index.d.ts
│   └── index.js
├── index.d.ts
├── index.js
├── theme.js
└── util.js

src/index.js

This is the entry point into Klondike, which exports the public API available to consumers.

src/index.d.ts

This is the entry point into Klondike's TypeScript definitions.

src/theme.js

This file defines the Glamorous theme used throughout the Klondike codebase. This allows components to use consistent colors, fonts, spacing, etc.

Component directory structure

Using Button as an example:

Button
├── Button.js
├── Button.md
├── index.d.ts
└── index.js
Button.js

The component file, which contains component styles, prop type documentation

Button.md

The component documentation used by React Styleguidist to create styleguide documentation.

index.js

The entry point into the component module. This file defines the public API and which modules should be exported for use by the src/index.js main module. This will usually just reexport the component from Button.js.

index.d.ts

The TypeScript definition for the component. This will be referenced by src/index.d.ts and exported for use by consumers.