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

generation-ui-components

v1.11.0

Published

React Generation Component Library

Downloads

390

Readme

Generation UI Components

This project is the library componets for React.

Features

  • [x] Core components
  • [x] Render testing
  • [ ] Warning in PropTypes
  • [ ] CD&CI to NPM and Preview
  • [ ] Definition for develop, staging and production environments
  • [ ] Custom Theme for Styled Componets

Content

  1. Architecure
  2. Install
  3. Configure
  4. Deploy
  5. References

1. Architecture

The file structure that we follow is the next:

generation-ui-components
│---README.md
│   wepack.config
│
│---assets
│   └---icons
│          icon1.svg
│          icon2.svg
│---components
│   └---ComponentName
│       │ tests
│       │ __snapshots__
│       │ ComponentName.js
│       │ index.js
│       │ README.md
│       │ ...

2. Install

$ npm install
  • Is required Node 10.16 or higher on your machine
  • Is required React 16 or higher on your machine

3. Run

  • To visualize the Style Guide with all the developed components (the command start is not defined):
$ npm run styleguide

The components will be visible in http://localhost:6060/

  • To connect this library to another project (say, Self Service)
  1. Build the project
$ npm run build
  1. Link this project locally to the project you want to use it. First do:
$ npm link

Then, in the project you want to use it:

$ npm link generation-ui-components
  1. Whenever a change is made on this library that must be reflected on the linked project, build again.

4. Adding external libraries

To mantain the library with a small size, big dependencies should be external To configure a external dependency go to webpack.config.js and add it. For example, if you want to have the external library Happy Feet. You would import it as:

import HappyFeet from 'happy-feet';

So in externals you should add

'happy-feet': {
  commonjs: 'happy-feet', 
  commonjs2: 'happy-feet',
  amd: 'HappyFeet',
  root: 'HappyFeet',
},

In the same file, resolve > alias add:

'happy-feet': path.resolve(__dirname, './node_modules/happy-feet'),

5. Building

Run

npm run build

Check that external libraries are not packed

Run

npm run stats

Navigate to http://chrisbateman.github.io/webpack-visualizer/

Find the generated json file, called webpack-stats.js Verify with the visualizer that your external library wasn't included

5. References