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

pigment-store

v0.1.1

Published

Welcome to Pigment Store repository!

Downloads

2

Readme

Pigment Store

Welcome to Pigment Store repository!

This project aims at creating a Living Documentation of React components. It is still in early stages of development, however if you are interested, feel free to open an issue or to contact me however you want.

Preview of Pigment Store basic example

Usage

Installation

The project is not released under npm yet.

You need to declare dependency using Git URLs as Dependencies

Add the following line to your package.json in devDependencies

"pigment-store": "git://github.com/julienpradet/pigment-store.git"

I'll try to make it available on npm soon.

Compute components dependencies inside your Pigment Store

Configure babel by adding the following plugin (.babelrc example):

["pigment-store/dist/core/babel-meta-plugin/index.js", {
  "rootDir": "."
}]

Generate the styleguide

With CLI

Nota Bene: If pigment store is installed locally, either use the npm scripts or use directly ./node_modules/.bin/pigment-store

pigment-store -s tests -o styleguide
Options :
--source, -s   <string> relative path to your tests directory
--output, -o   <string> relative path to your styleguide directory
--dev          [<bool>] watch file changes

With a custom script file

Create the following file :

// file: scripts/generateStyleguide.js
import path from 'path'
import browserifyBundler from 'pigment-store/dist/core/generator/js/bundler/browserify'

// Define where are your tests (here it is {YOUR_PROJECT}/tests)
const testDir = path.join(__dirname, 'tests')
// Define where will your styleguide is built (here it is {YOUR_PROJECT}/tests)
const styleguideDir = path.join(__dirname, 'styleguide')

generator(testDir, styleguideDir, {
  bundler: browserifyBundler, // See `Configure the rendering pipeline` in `doc/README.md`
})

Add it to your task runner pipeline or directly use it :

node scripts/generateStyleguide

Development

Clone repository

  • git clone https://github.com/JulienPradet/pigment-store.git

Test example on your machine

  • cd pigment-store
  • npm run build
  • npm run serve
  • node examples/basic/styleguide/server.js

Run development env on your machine

  • cd pigment-store
  • npm run dev
  • npm run serve:watch
  • node examples/basic/styleguide/server.js

Roadmap

0.1.0

Styleguide

  • [x] Finish card design : icon + bigger toggle button area
  • [x] Make feature links an anchor rather than a popin
  • [x] Add categories based on folders architecture
  • [x] Style horizontal menu
  • [x] Add button to reset search menu

API

  • [x] Improve the pigment-store cli
  • [x] Improve fluent API for tests

Documentation

  • [x] Describe how to use the CLI
  • [x] Descrbie how to write a test file
  • [ ] Make screens to show how awesome the styleguide is

0.2.0

Styleguide

  • [ ] Add proptypes to component description
  • [ ] Use a index.js or README.md file on test root dir in order to populate the home page
  • [ ] Use a index.js or README.md file to add a description for each category
  • [ ] Use an iframe to display elements
  • [ ] Disco mode

API

  • [ ] Enable CSS inline and relative

Testing

  • [ ] Add visual testing tooling

Toolchain ~ need contribution help

  • [ ] HMR in dev mode
  • [ ] Move toward webpack (since it's becoming a more serious thing)

Documentation

  • [ ] Add full example for the styleguide itself for view elements
  • [ ] Add architecture documentation so that one can add any kind of renderer

0.3.0

Styleguide

  • [ ] Styleguide display should be in core, and react/display should only have the renderers (component details, etc.)
  • [ ] Enable tags that select a specific renderer
  • [ ] Add animation on load

Testing

  • [ ] Add proper testing

Inpirations

  • react-storybook : I enjoyed the testing approach for declaring new components. However its aim is to provide a good developping experience for UI Components. It doesn't really suite Styleguide approachs.
  • [http://patternlab.io/](Pattern Lab) : It is more suited as a Styleguide. The resizing feature and the patterns dependencies are awesome. However, the needed directory structure felt overcomplicated compared to the testing approach.