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

@moda/om

v19.7.2

Published

Moda Operandi design system

Downloads

290

Readme

@moda/om

semantic-release

Moda Operandi's design system expressed as React components.

Meta

  • State: development
  • Point people: Ecommerce Team
  • URLS:
    • Documentation: https://moda-om-documentation.netlify.com/
    • Storybook: https://moda-om-storybook.netlify.app/

Developing

Getting Started

Clone this repository and install dependencies:

git clone [email protected]:ModaOperandi/om.git
cd om
npm install

This repo includes scaffolders for generating folder/file structure for: React Components, as well as SASS mixins and functions.

npm run scaffold:component FooBar
# => Wrote: ./src/components/FooBar/index.ts
# => Wrote: ./src/components/FooBar/FooBar.scss
# => Wrote: ./src/components/FooBar/FooBar.stories.tsx
# => Wrote: ./src/components/FooBar/FooBar.tsx
# => Wrote: ./src/components/FooBar/FooBar.test.tsx
# => Updated index.
# => ✨Done in 0.10s.

This creates a folder in the correct place in addition to immediately runnable test and story. The React component it generates has some reasonable defaults, such as extending the base HTML element types as well as ensuring the component can be extended using CSS. It updates the components/index.ts with it's own export so that when built the component is importable via named import.

The SASS scaffolders functions in a similar manner.

npm run scaffold:mixin foobar
# => Wrote: ./src/mixins/foobar/_foobar.scss
# => Wrote: ./src/mixins/foobar/foobar.stories.scss
# => Wrote: ./src/mixins/foobar/foobar.stories.tsx
# => Updated index.
# => ✨Done in 0.10s.

Developing

Once you've scaffolded out the file structure, boot up Storybook to drive out the component's development.

npm run storybook
# => Local: http://localhost:6006/

You'll see your scaffolded story in the appropriate place in the story tree.

Committing and Releasing

We are using semantic release to automate versioning and publishing the package, and commitizen to assist with formatting commits conforming to conventional changelog.

Once you want to commit something, git add it then run the commitizen CLI. If you have it installed globally (npm install -g commitizen), you can run git cz and it will walk you through the steps.

When you're happy push to a feature branch and once the code is in main, semantic release will detect how to version it and automatically publish it to NPM.

  • Netlify deploy config is located here: https://app.netlify.com/sites/moda-om-storybook/configuration/deploys

  • Netlify site overview: https://app.netlify.com/sites/moda-om-storybook/overview

(settings specified in netlify.toml override any corresponding settings in the Netlify UI)

Usage

Getting Started

npm install --save @moda/om

Import the Component CSS in your global SCSS file:

@import '~@moda/om/dist/styles';

Import and use components:

import { Button } from '@moda/om';

<Button>Click me</Button>;

Import and use the mixins/functions library:

@import '~@moda/om';

body {
  @include text(body1);
  padding: spacing(2, 4);
}