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

@meundies/loom

v9.13.4

Published

Weaving MeUndies

Downloads

482

Readme

MeUndies Loom

Maintainability Test Coverage CircleCI Storybook npm (scoped)

https://meundies.github.io/loom https://loom.meundies.dev

Weaving MeUndies, one thread at a time.

Getting Started

To start, download and clone this repository, then install dependencies using yarn.

New components can be developed in storybook. Use yarn run storybook to start the storybook server. Each new component should contain stories and be properly tested using enzyme.

New sub-directories will need to be whitelisted in package.json under the files object, or they will be pruned during the build process.

Component Conventions

For component development, we use the following conventions:

  1. No default exports.
  2. Pass the className prop to components, so that style extensions and overrides work reliably on all components.
  3. For interactive components, include an interactive example.
  4. Interactive components should be keyboard accessible. Use the a11y tab to check for common issues.
  5. Tests should at a minimum contain the following three tests:
    1. no default export
    2. properly named export
    3. a "normal" render snapshot
  6. Use mount or render for snapshot testing, so that our tools recognize different prop combinations for code coverage.
  7. Connect the component to Zeplin by adding to .zeplin/components.json. zeplin connect is run in CI and pulls from our this json file to sync Zeplin and Storybook to our codebase whenever we merge to master.
    1. Documentation: https://github.com/zeplin/connected-components-docs
    2. path key maps the component to our codebase
    3. zeplinNames key maps it to Zeplin ( )
    4. storybook key maps it to Storybook https://github.com/zeplin/connected-components-docs/blob/master/docs/link/STORYBOOK.md

Contributing

This project follows the angular commit message guidelines. For more information, see here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit

Using the package from npm

In your project, install using yarn add @meundies/loom. Components can be used as such:

import { Button } from '@meundies/loom/components'

Configuring Fonts

Next, configure your fonts by declaring your body and header font familys as css variables, following the examples below. You may also use ./storybook/preview-head.html as a reference as well.

` :root { --font-family-body: 'ProximaNova'; --font-family-header: 'SharpSansNo1'; }

@font-face { ...body font } @font-face { ...header font } `

Note: loom is configured to use bold over 600 for bold fonts. For best browser compatibility, define your bold fonts to use font-weight: bold instead of font-weight: 600. Doing the later can result in inconsistent font weights across Chrome and Firefox.

Consuming Loom components

The safest way to consume and modify Loom components is to use the props built in to the component. These are tested and work as intended.

However, there may be cases where you may need to style Loom components beyond what we have natively exposed. Loom components are made using styled-components and follow their best practices so that styled(LoomComponent) and other re-styling syntaxes are facilitated.

https://styled-components.com/docs/basics#styling-any-component https://styled-components.com/docs/advanced#styling-normal-react-components

Examples of CSS properties that you might commonly use to extend our components are: position, margin, padding, opacity.

Using the package locally

We recommend using yalc for local development. It accurately reproduces the build and package process used by NPM, and should also be able to share the package between different node versions you have installed locally.

Testing

To test changes, run yarn test. Components are tested using Jest and Enzyme. Snapshots will be generated when a new test is first run. When a component is changed, snapshots can be updated using yarn run test:jest -u.

A note on dependencies

All dependencies will likely fall into two buckets - peerDependencies or devDependencies.

peerDependencies

These are dependencies that the consumer must install, and are required for this package to work. Some examples are react and react-dom - both libraries are not included with loom, but are required for loom to run. When updating these packages, it also requires the client to update their version as well.

devDependencies

These are dependencies that are only used for development, which are not used by loom at run time. This includes libraries such as babel, storybook, and typescript.