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

cruk-pattern-library

v2.0.2

Published

CRUK Pattern library.

Downloads

17

Readme

CRUK Pattern Library

This project is a fork of the excellent Primer project by GitHub.

The aim of this is to provide a componentised approach to how we create interfaces in a consistent and efficient manner. This work is Open Source, we care about the wider community and are grateful to be part of it. We both benefit from Open Source and wish to give back by sharing the sum of our research and work in crafting carefully thought out solutions (UX, Design and Implementation).

This repository is the home of both our base front-end code and the place where it is documented.

Contents

Working Methodology

When working on a new proposition/project, this project should be forked which is where any new components for the pattern library would be developed and iterated over. Components would make their way to this central project by pull requests. By working in this way we can maintain a mainline of development whilst still allowing new components to be worked on.

As this repository is both code and documentation when working on a new pattern the pull request to include it should have both Browser & Device tested code along with documentation for the new component.

You can view the pattern library itself at http://crukorg.github.io/cruk-pattern-library/.

Documentation

The Pattern Library is built with Jekyll and published via the gh-pages branch of this repository.

Dependencies

You'll need the following installed:

  • Latest Jekyll (minimum v2.2.0): $ gem install jekyll
  • Latest Rouge: $ gem install rouge
  • Latest Sass: $ gem install sass
  • Latest Grunt CLI: $ npm install -g grunt-cli
  • Node.js and npm

If you have all those set up, now you can install the dependencies:

$ npm install

Running locally

From the Terminal, start a local Jekyll server:

$ jekyll serve

Open a second Terminal tab to automatically recompile the Sass files and run autoprefixer.

$ grunt watch

Alternatively, you can manually run grunt and jekyll serve when needed.

Publishing documentation

Use the included Grunt task to generate and publish the library to the gh-pages branch.

$ grunt publish

This takes the _site directory, generates it's own Git repository there, and publishes the contents to the gh-pages branch here on GitHub. Changes are reflected in the hosted docs within a minute or so.

Code stats

When compiling or watching the Sass files Grunt will automatically generate a .cruk-base-stats.md file. This is tracked in the Git repository to provide us historical and contextual information on the changes we introduce. For example, we'll know when the number of selectors or declarations rises sharply within a single change.

Development

Development happens in our primary branch, master. For stable versions, see the releases page. master will always be up to date with the latest changes, including those which have yet to be released.

Contributing

When contributing changes, be sure to do the following steps when opening a pull request:

  1. Bump the version number in package.json.
  2. Run grunt and commit the changes. This compiles the SCSS to CSS so we can do basic analysis on the number of selectors, file size, etc.

All HTML and CSS should conform to the style guidelines.

Editor preferences are available in the editor config for easy use in common text editors. Read more and download plugins at http://editorconfig.org.

Versioning

This library follows the Semantic Versioning guidelines.

License

Created by and copyright Cancer Research UK. Released under the MIT license.

Roadmap

@TODO: We need to refactor the JS to remove the dependency on jQuery. We should write in vanilla js. @TODO: Implement eslint instead of hound.