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

yunt-modules

v1.0.4

Published

My personal module collection

Downloads

232

Readme

My Personal Modules

Installation

You can install the required dependencies using one of the following methods:

Method 1: Install specific packages

Run the following command to install all necessary packages:

npm install css-loader html-loader html-webpack-plugin style-loader webpack webpack-cli webpack-dev-server webpack-merge @eslint/eslintrc @eslint/js eslint eslint-config-airbnb-base eslint-config-prettier eslint-plugin-import eslint-plugin-prettier globals prettier --save-dev

Method 2: Install from package.json

Alternatively, if a package.json file is present, simply run:

npm install

Modules

Adding a Dropdown

To add a dropdown to your project, follow these steps:

  1. Add the following HTML to your desired location:
<div class="dropdown">
  <div class="select">
    <span class="selected">Dog</span>
    <div class="caret"></div>
  </div>
  <ul class="menu">
    <li class="active">Dog</li>
    <li>Cat</li>
    <li>Hamster</li>
    <li>Bird</li>
    <li>Fish</li>
  </ul>
</div>
  1. Import the module:
import initDropdown from "yunt-modules";
  1. Initialize the dropdown by calling the following function in your JavaScript:
initDropdown();

Make sure this function is called after the DOM has loaded.

CSS Styles

Import your current project's CSS last and use these rules to customise the dropdown:

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.dropdown {
  min-width: 15rem;
  position: relative;
  margin: 2rem;
}

.select {
  background: #fff;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px #ddd solid;
  border-radius: 0.5rem;
  padding: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.select-clicked {
  border: 2px #007bff solid;
  box-shadow: 0 0 0.8rem rgba(0, 123, 255, 0.5);
}

.menu li.active:hover {
  background: #007bff;
  color: #fff;
}

.select:hover {
  background: #f7f7f7;
}

.caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #333;
  transition: 0.3s;
}

.caret-rotate {
  transform: rotate(180deg);
}

.menu {
  list-style: none;
  padding: 0.2rem 0.5rem;
  background: #fff;
  border: 1px #ddd solid;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  color: #333;
  position: absolute;
  top: 3rem;
  left: 50%;
  width: 100%;
  transform: translate(-50%);
  opacity: 0;
  display: none;
  transition: 0.2s;
  z-index: 1;
  margin-top: 10px;
}

.menu li {
  padding: 0.7rem 0.5rem;
  margin: 0.3rem 0;
  border-radius: 0.5rem;
  cursor: pointer;
}

.menu li:hover {
  background: #f7f7f7;
}

.active {
  background: #007bff;
  color: #fff;
}

.menu-open {
  display: block;
  opacity: 1;
}