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

@nycopportunity/pttrn-docs

v1.1.1

Published

Reusable documentation for pattern libraries created with the @nycopportunity/pttrn-cli

Downloads

21

Readme

Patterns Documentation

Reusable documentation for pattern libraries created with the @nycopportunity/pttrn CLI. Save time on writing common documentation.

Table of Contents

Available Guides

Name | Description --------------------------------------------|- Installation | How to install pattern libraries in projects that will use them. Contributing | A general developers contribution and style guide. Patterns | An overview of the design patterns methodology for elements, components, objects, and utilities. Prototyping | A guide on prototyping with pattern libraries and Figma using the HTML to Figma plugin. Tailwindcss | An introduction to Tailwindcss and Slm markup that will use a tailwindcss.js configuration to create an interactive table demonstrating the configuration.

To include them in other pattern library static documentation sites use the this.include() method and double equals sign == render markdown files as HTML. Pass the full path to the desired file in the node modules directory.

== this.include('../node_modules/@nycopportunity/pttrn-docs/installation.md')

Package variables

The following template variables are used by the documentation to refer to paths specific to your project. Template variables set to this.package refer to values stored in your project's package.json file. Some are required for NPM package.json files and others are custom attributes.

Template Variable | Description --------------------------------------------|- this.package.name | The package name. See NPM package.json documentation for details. This may or may not include an NPM Organization prefix. this.package.nice | A human readable package or pattern library name. this.package.version | The package semantic version. See NPM package.json documentation for details. this.package.cdn.url | The preferred CDN url. Usually matches the pattern https://cdn.jsdelivr.net/gh/{{ GitHub Organization }}/{{ repo }}. This example uses JS Delivr. this.package.cdn.source | The GitHub repository url. Usually matches the pattern https://github.com/{{ GitHub Organization }}/{{ repo }} this.package.cdn.archive | The GitHub archive url. Usually matches the pattern https://github.com/{{ GitHub Organization }}/{{ repo }}/archive. this.package.cdn.styles | The local path to the fully distributed stylesheet module. this.package.cdn.scripts | The local path to the fully distributed JavaScript module. this.package.cdn.svg | The local path to the fully distributed SVG sprite. this.package.cdn.tailwindcss | The local path to the fully distributed Tailwindcss utility CSS stylesheet. this.package.cdn.tailwindsass | The local path to the fully distributed Tailwindcss Utility Sass stylesheet. this.package.instantiations.scripts | The main script module name used to instantiate the global pattern script. For example new Default() would instantiate a module named Default.

Below is how template variables are set in a sample package.json file.

{
  "name": "@npm-organization/pattern-library",
  "nice": "My Pattern Library",
  "version": "1.0.0",
  "cdn": {
    "url": "https://cdn.jsdelivr.net/gh/github-organization/pattern-library",
    "source": "https://github.com/github-organization/pattern-library",
    "archive": "https://github.com/github-organization/pattern-library/archive",
    "styles": "/dist/scripts/default.css",
    "scripts": "/dist/scripts/default.js",
    "svg": "/dist/svg/svgs.svg",
    "tailwindcss": "/dist/styles/tailwindcss.css",
    "tailwindsass": "/dist/styles/_tailwindcss.scss"
  },
  "instantiations": {
    "scripts": "Default"
  },
  // ...
}

Slm Variables

Additional template variables can be set in the project config/slm.js.

Template Variable | Description ---------------------------|- this.marked.headerPrefix | Prefix for markdown file heading IDs. This should be set to a blank string if no prefix is desired ''. This assists with inline anchor links.