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

@obl/react-obl-ui

v0.0.1

Published

UI OBL Library

Downloads

5

Readme

react-obl-ui

React components for OpenBrainLab UI

HOW TO PUBLISH TO NPM (IMPORTANT) - READ FIRST

Inside src folder we have a place where our component sourcefiles can live.

Inside src directory, index.js file is the entry point of our module. It should import all your components and exports them again. (Look inside index.js file for the structure). There is SimpleButton React Component.

BEFORE YOU PUBLISH YOU NEED TO RUN SCRIPT: we need a command that converts our sources before they are published to npm. (LOOK INSIDE PACKAGE.JSON)

$ npm run build

It calls babel tells it: "Please convert everything inside src into the output folder dist. Also create sourcemaps (-s) and inline them into the javascript files.

If you execute now npm run build, a dist folder will appear inside your project containing the converted files.

We want to tell npm exactly which files are going to be published, since only the contents of the dist folder are necessary for anyone installing our component(s). On NPM we are publishing only what is inside dist folder and entry point is index.js inside that folder.

NOW YOU CAN RUN

$ npm run publish

HOW TO TEST COMPONENT BEFORE PUBLISHING TO NPM (IMPORTANT READ)

Inside demo/src there is index.html. Inside head tag we need to include font awesome and bulma css. If we do not import these two things it will not work properly and we will not have any style. (THIS SHOULD BE ALWAYS WHEN CCREATING NEW REACT APP. WE NEED THIS TWO THINGS.!!!!!)

<link
      rel="stylesheet"
      href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
      integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
      crossorigin="anonymous"
    />
    <link
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.min.css"
    />

Inside demo/src is App.js file where we import our component we want to publish on npm

import { SimpleButton } from "../../dist";

in order to see output run the command inside demo folder:

$ npm start

it will bundle all the things and you can see in the localhost:1234