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

jw-global-components

v1.0.11

Published

--- # Overview The purpose of this project / repository is to maintain a Global React Component library that can be utilized across one or more React Apps

Downloads

15

Readme

Batesville Global Component repository


Overview

The purpose of this project / repository is to maintain a Global React Component library that can be utilized across one or more React Apps

Build / Package Library

Build / Packaging Tool

The Vite build & packaging process utilizes a Library mode that provides a configurable set of tools to package a React Component Library

Library Packaging

1. Typescript Build

The code within the /lib directory is built using typescript tsc build process

2. Vite Build Process

The code is then packaged using the Vite packaging process which...

1. Read Vite Config

Vite build process reads the vite config file vite.config.js which is used to orchestrate the build & packaging process

2. Output es & umd files

The vite build process will generate es & umd files based on the exported members of lib/index.ts and output them in dist/

3. Compiles CSS

The vite build process will compile the library CSS using the index.css and the @storeront-ui tailwind configuration and output the following file /dist/styles.css

4. Asset packaging

The vite build process will copy the items from the /public directory to the /dist

IMPORTANT The nextjs compiled from end WILL NOT be able to read / process image from the /distdirectory. Please consult the section on Using the Component Library

5. Releasing / Publishing Library

Once the library has been compiled via the Batesville Azure Dev pipelines, the artifact(s) will be built and stored in the Batesville Artifact repository

Using Components from the Library

1. Installation

The component library package(s) will be downloaded / installed from the Batesville Artifact Repository and installed in the node_modules directory

2. Post Install Operation

A custom script is recommended to be run to copy anu custom image assets from the library's /dist/images, dist/icons and dist/data directories to the projecft 's public folder given NextJS applications will ONLY consider assets from the apps public folder

Postinstall script

  • Cross Environment Support: Recommend using the shx package for cross env support so that a file copy process can be executed

3. Import the component file & CSS

Component Import

Import the desired component file(s) using a standard es6 import

import {LogoComponent} from '@batesville/react-component-library'

CSS Import

Import the CSS to inherit the component's CSS & styling

import '@batesville/react-component-library/dist/style.css'