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

@striblab/strib-styles

v0.10.1

Published

Star Tribune style guide

Downloads

6

Readme

Strib Styles

Styles and style guide for front-end work at the Star Tribune.

About

The Strib Styles is a set of SASS, CSS, JS, and markup for building front-end web projects. This is separate from the styles that are on the main web property, though hopefully they will be put together one day.

Philosophies

A lot of code, styles, and inspiration were taken from Bootstrap. Bootstrap or similar was not used as a base, as these systems actually make a lot of design decisions and assumptions that are hard to fully override, making a less than ideal outcome.

All things should be responsive, which means that they should look good on all screen sizes. CSS media queries should be mobile-first, which means the default style should be for a small screen.

Pre-defined breakpoints are necessary, but arbitrary since there are basically infinite screen sizes and densities these days. These styles have common breakpoints, but these can and should be changed for your project so that content looks good no matter the screen.

Font-sizes and spacing should be relative as much as possible. This means using em mostly and % for things like width and height. Since these styles are made to be able to be embedded in a site with existing styles, rem usage is avoided, though would be ideal for component-level sizes.

Avoid top-margin as it can be be collapsed and create unexpected results.

Development

Dependencies and prerequisites

The following is a one-time installation and quite possibly already installed for you.

  1. Install Git.
    • On a Mac, this can be installed with Homebrew: brew install git
  2. Install Ruby
    • On a Mac, this is already installed
  3. Install Node
    • On a Mac, this can be installed with Homebrew: brew install node
  4. Ensure bundler is installed: gem install bundler
  5. Ensure gulp is installed globally: npm install -g gulp

For this project specifically:

  1. Get the code: git clone https://github.com/striblab/strib-styles.git && cd strib-styles
  2. Install Ruby gems: bundle install --path ./.bundle
  3. Install Node packages: npm install

Docker

To run the development environment, i.e. gulp develop in Docker, which will help if installing dependencies locally is a problem, do the following:

  1. Install Docker
  2. Run docker-compose up
  3. Open http://localhost:3000 in your browser.
  4. You can use Control+C to get out of the command, but make sure to run docker-compose down to completely stop the container from running.

Note that the live changes that trigger a build and should show up in the browser automatically are a little slower when running through Docker, but hopefully not restrictively so.

To manually build and run with docker, the following commands should work:

  1. docker build -t "strib-styles" .
  2. docker run -i -t --rm -v`pwd`:/src -p "3000:3000" -p "3001:3001" "strib-styles"

Styles

The uncompiled CSS/Sass styles are in the source/styles folder.

Guide

The guide, or the reference for the styles, is a Jekyll site under source/guide/ which will get compiled to the guide/ directory.

  • Guide specific files are managed in source/guide/guide-styles/
  • The core styles will be compiled and added to the guide in source/guide/styles/ via the build process.
  • TODO: Describe custom variables and plugins.

Local server

To run a local server and automatically run the build process on file changes, use the following:

gulp develop

Building

Styles

To build the CSS and JS assets of the styles:

gulp build:styles

Guide

To build the Jekyll-powered guide, run the following:

gulp build:guide

Deploy

Guide

The following will push only the contents of guide to gh-pages so that it can be easily hosted on Github:

gulp publish

Publish

To publish to npm.

  1. Update package.json version, and rebuild with gulp
  2. Run npm install to update package-lock.json
  3. Commit changes.
  4. Tag: git tag X.X.X
  5. Push changes: git push origin --tags
  6. Publish: npm publish --access public