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

pattern-library

v0.1.4

Published

A repository of HTML Patterns and their supporting files.

Downloads

129

Readme

Pattern Library: Basic HTML Patterns

This repository is a set of html patterns following the pattern-library organizational model.

This pattern library is a collection of base html elements and common html patterns. Using this as a dependency of your project's pattern library will give you all the basic html elements for styling inside of Pattern Lab.

Requirements

Installation

To install as a stand-alone library:

  • Clone this repo
  • Install NPM dependencies npm install
  • Install an instance of Pattern Lab, then import this Pattern Library and local site files into Pattern Lab gulp build
  • Run server, watch files gulp serve

To install as a dependency of an existing library or project

  • Import to your library via NPM npm install pattern-library --save

Import only specific patterns into Pattern Lab

Importing files from your pattern library into Pattern Lab is done with the Pattern Importer. Specifically, it uses the gulp task included with the Pattern Importer. This gulp task uses a configuration to decide where to import your patterns, and which patterns to import.

To use only a portion of this pattern library, you need to change the configuration file ./config.yml. You will be changing the settings for the pattern-importer gulp task. The default for this task inside of ./config.yml is this:

...
  patternImporter:
    localPatterns:
      config:
        htmlTemplateDest: '{{ fileTypes.patterns.prototyperDestDir }}'
        stylesDest: '{{ fileTypes.sass.prototyperSrcDir }}/local'
        scriptsDest: '{{ fileTypes.js.prototyperSrcDir }}/local'
        convertCategoryTitlesDataFile: './lib/data/pattern-lab-categories.yml'
      taskName: 'patterns-import-local'
      src:
        - './patterns/**/pattern.yml'
...

You will be changing the src config.

Import specific patterns: One pattern

You want to import only one pattern, blockquote:

./patterns/atoms/text/blockquote

Your local patterns source configuration will then be:

...
      src:
        - './patterns/atoms/text/blockquote/pattern.yml'
...

Import specific patterns: One Subcategory

So, let's say you wanted to only import html patterns that are in the lists subcategory of atoms:

./patterns/atoms/lists

Your local patterns source configuration will then be:

...
      src:
        - './patterns/atoms/lists/**/pattern.yml'
...

Import specific patterns: Two Subcategories, ignore one pattern

The src option is an array and it can also contain the option to ignore files and directories as well. So, let's say you wanted to only import html patterns that are in the lists and text subcategories of atoms, but not include the blockquote pattern. Your local patterns source configuration will then be:

...
      src:
        - '!./patterns/atoms/text/blockquote/pattern.yml'
        - './patterns/atoms/lists/**/pattern.yml'
        - './patterns/atoms/text/**/pattern.yml'
...