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

protagonist-react

v0.1.14

Published

This project is made, in first place, for the [developer.laposte.fr](https://developer.laposte.fr) website for render API documentation from API Blueprint.

Downloads

27

Readme

protagonist-react Build Status

This project is made, in first place, for the developer.laposte.fr website for render API documentation from API Blueprint.

It is based on reactstrap and bootstrap v4 css. It is used for Badge and Collapse

We use Highlight.js for body request and response, headers, etc. syntax coloration.

This project contains a list of component and an entry point <Protagonist source={data} />

this entry point has for now only one propTypes :

Protagonist.propTypes = {
  source: React.PropTypes.object,
};

Example

import React from 'react';
import { Protagonist } from 'protagonist-react';

function MyComponent({apibJson}) {
  return (
    <div>
      <Protagonist source={apibJson} />
    </div>
  );
}

This source props is a JSON generated via protagonist which is a nodeJS library for transforming API Blueprint files (.apib) in JSON.

Protagonist

Protagonist must be used with options { type: 'ast' }.

The JSON should looks like :

{
  "_version": "4.0",
  "metadata": [],
  "name": "My API",
  "description": "",
  "element": "category",
  "resourceGroups": []
}

TODO

  • [ ] Add a JSON as API documentation example
  • [ ] Static website documentation for all components
  • [x] Add Enzyme for tests
  • [ ] each component tested
  • [ ] Customization
  • [ ] More generalist lib
  • [x] Add Storybook
  • [ ] Add React-Intl