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 🙏

© 2026 – Pkg Stats / Ryan Hefner

libe-components

v1.2.2

Published

## General purpose

Readme

Libé Components

General purpose

This projects holds reusable UI components for Libé Labo apps. This repo only takes care of the DOM and logical description of these components. For the styles, see libe-static-ressources.

~~See a live demo of all the components here~~ (soon).

Home repo: https://github.com/libe-max/libe-components NPM: https://www.npmjs.com/package/libe-components

Technologies

The project uses React. Components are transpiled via @babel/plugin-transform-react-jsx.

Install, start, build & publish

Install

# Go to your favorite location
> cd /wherever/you/want/

# Create a place for your database to store data
> mkdir libe-database && mkdir libe-database/db

# Clone libe-components and its friends
> git clone https://github.com/libe-max/libe-components.git
> git clone https://github.com/libe-max/libe-static-ressources.git
> git clone https://github.com/libe-max/libe-data-server.git

# Install dependencies (libe-static-ressources has none)
> cd libe-data-server/ && npm i
> cd ../libe-components/ && npm i

# It's all good!

Install as a dependency

# Go to your project
> cd /wherever/your/project/is
> npm i libe-components

Start

# Start the libe-static-ressources (simple HTTP python server on port 3003)
> cd /wherever/you/installed/libe-static-ressources/ && npm start

# Run a MongoDB instance on default port (27017)
> mongod --dbpath ../libe-database/db/

# Start the libe-data-server (Nodejs/Expressjs server on port 3004)
> cd ../libe-data-server/ && npm start

# Start libe-components (React app with hot reloading on port 3002)
> cd ../libe-apps-template/ && npm start

Build

> cd /wherever/you/installed/libe-components/

# Please, do lint.
> npm run standard-fix

# Build
> npm run build

Publish

> cd /wherever/you/installed/libe-components/

# Commit and push everything
> git add *
> git commit -m "some lowercase descriptive action text"
> git push origin master

# Update "version" field in package.json, according to the [semantic versionning](https://semver.org/) method.
> nano package.json

# Install dependencies again in order to update package-lock.json
> npm i

# Commit & push version change
> git add *
> git commit -m "v{MAJOR}.{MINOR}.{PATCH}"
> git push origin master

# Publish to NPM
# (no need to build: npm run build is specified as a prepublish script in package.json)
> npm publish

Use

import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import Paragraph from 'libe-components/lib/text-levels/Paragraph'

function App () {
  return <div>
    <Paragraph big>Here is a big paragraph</Paragraph>
  </div>
}

ReactDOM.render(
  <App />,
  document.getElementById('root')
)

Contents

libe-components
├── package.json
├── package-lock.json
├── build.sh
├── .babelrc
├── .npmignore
├── node_modules/
├── public/
    ├── index.html
    ├── ...
├── lib/
├── src/
    ├── index.js
    ├── components/

| Path | Purpose | | ---------------------- | ------------------------------------------------------------ | | /package.json | The ID card of the project | | /package-lock.json | Don't touch this | | /build.sh | The script executed in order to make a NPM ready components library | | /.babelrc | Config file for Babel | | /.npmignore | As a NPM module, no need for the /public/ and the /src/ directories, since /build.sh transpiles components in /lib/ | | /node_modules/ | Where the dependencies of the project are | | /public/ | Home of the static files | | /public/index.html | The template page where the demo of all components is displayed | | /public/* | Static ressources for the components demo page | | /lib/ | Build directory. Contains a transpiled version of everything in /src/components/ | | /src/ | Home of the source files | | /src/index.js | A page displaying all components in /src/components/. Not exported in /lib/ | | /src/components/ | All the standalone components |

Component file template

import React, { Component } from 'react'
import PropTypes from 'prop-types'

/*
 *   Example component
 *   ------------------------------------------------------
 *
 *   DESCRIPTION
 *   Short description of how this works
 *
 *   PROPS
 *   list, of, props
 *
 */

export default class Example extends Component {
  /* * * * * * * * * * * * * * * * *
   *
   * CONSTRUCTOR
   *
   * * * * * * * * * * * * * * * * */
  constructor () {
    super()
    this.c = 'lblb-example'
  }

  /* * * * * * * * * * * * * * * * *
   *
   * RENDER
   *
   * * * * * * * * * * * * * * * * */
  render () {
    const { c } = this
    
    /* Assign classes */
    const classes = [c]

    /* Display component */
    return <div className={classes.join(' ')}>
      Example component
    </div>
  }
}

/* * * * * Prop types * * * * */
Example.propTypes = {}
Example.defaultProps = {}

Auteurs


Logo Libération Logo Libé labo