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

@humblebee/humblebee-frontend

v1.0.37

Published

This boilerplate is the central point of Humblebee's web projects. It's a living project and therefore it is encouraged that everyone at Humblebee add requests or additional features as they are needed. It's meant to standardize a stack and working proced

Downloads

30

Readme

humblebee-frontend

This boilerplate is the central point of Humblebee's web projects. It's a living project and therefore it is encouraged that everyone at Humblebee add requests or additional features as they are needed. It's meant to standardize a stack and working procedure, but is not necessarily the full extent of any given project. As a boilerplate it should lay the bar (preferably, lay it high) and be useful in most common use cases.

Prerequisites

  • Node (includes NPM and NPX) version 10+
  • Yarn version 1.9.4 or later
  • Make sure you are logged in to NPM in your Command Line Interface (CLI) by running npm login first; otherwise you may not be able to fetch the Humblebee package

Features

  • Built from the ground up to support Progressive Web Apps
  • "It just works": Ready to deploy immediately (after installation, of course) since we have everything in place from HTML to UI
  • Super performant: Bundling, loading, tree-shaking, code splitting via Webpack
  • Asynchronous loading of routes and components
  • UI-friendly: Design Tokens make for a central location of all design variables, and React Storybook makes UI development quick and painless
  • Extensible configurations, where most of it is hidden out of sight
  • High Quality: Enforced linting during devtime as well as pre-commit
  • High Standards: Uses a conventional, highly modular structure with options to use Typescript and Jest
  • High Security: Uses Snyk to check for project vulnerabilities, and includes A+ grade server headers with prebaked Content Security Policy

Stack

  • Webpack 4
  • React 16.8
  • React Storybook
  • Styled Components 4
  • Babel 7
  • ESLint, Stylelint, TSLint
  • Prettier
  • Jest (optional)
  • Typescript 3 (optional)
  • Figmagic

Installation

Installation is ONLY done via @humblebee/humblebee-starter.

Run yarn setup to install all of the things. Running only Yarn means you will only get the dependencies, but no setup for Storybook etc.

Also: Make sure to update manifest.webmanifest, index.html and other client-facing locations to have the pertinent, correct information for your project.

Commands

All commands are, as usual, available in package.json. Make sure to configure the various variables, such as URLs before doing anything.

  • yarn commands: Display ALL available commands
  • yarn dev: Start development server
  • yarn build: Output a static build
  • yarn plop function: Create new function with Plop (function file, test)
  • yarn plop class: Create new class with Plop (class file, test)
  • yarn plop component: Create new component with Plop (component file, Styled Components file, Storybook item)
  • yarn storybook: Start React Storybook
  • yarn build:storybook: Build React Storybook
  • yarn teardown: Take down Surge site
  • yarn figmagic: Grab everything from your linked Figma design document (specs, images, tokens)
  • yarn figmagic:tokens: Get tokens (and build them) from your linked Figma design document

Test commands: those ones currently require the app itself to run in another process (launch yarn dev in another process before).

  • yarn test:e2e: Run end-to-end tests (using puppeteer: automatically open a window, start clicking around, filling forms etc.)
  • yarn test:visual: Run visual regression tests: will take screenshots of pages, and compare them with previous version.
  • yarn test:all: Run end-to-end and visual regression tests (feel free to adapt it to run any kind of test you wish!)

PWA considerations and asset generation

Splash screens

The folder src/assets/splash contains the various sized screens that a PWA requires (at least on iOS) when starting in standalone mode. They are not unused unless you specify standalone as the display mode in webmanifest.manifest.

Image optimization

The postbuild process will optimize all SVGs, and Webpack will treat any JPGs.

For manual SVG optimization, please use SVGO or SVGOMG. All settings should be activated except "Remove XMLNS" and "Remove viewbox" — We want the viewbox rather than pixel values. Precision can usually be set really low, and often it works just fine to put it to the lowest value (1).

Icons/favicons

Create a high-resolution icon of at least 512x512px, then convert it with the following two sites:

These generators create a bit different filesets. What you want is to get all of the files of the two ZIP files, except the manifest file which we have already set up correctly. These (fav)icons should go into the folder src/icons/.

Creating components

Rather than manually create components, use yarn plop to do so. It will create a main component file, Styled Components file, test and a Storybook item for you.

State management and connected components

We use React's context and provider pattern for state management, or just plain-vanilla prop passing.

Figmagic API keys and URL

Make sure these are correct both in package.json, node_modules/figmagic/bin/getImages.mjs and node_modules/figmagic/bin/meta/keys.mjs.