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

oleg-starter-pack

v4.2.0

Published

Some handy base Sass and utility classes for use in projects.

Downloads

98

Readme

"Oleg" starter pack

The files contained here are intended to provide a project agnostic starting point for your CSS to include in any web project. This version is pretty "bare bones" but will gradually evolve to include more useful features and utitlities.

This package is distributed through npm.

Requires:

File structure

There are currently three directories, variables, base and utilities. They are intended to be used on any project but the key difference is how the code is used.

Variables

Files in variables contains specific variables for breakpoints, fonts, etc.

These variables are the default AP variables and can be overridden in other brand kits

Base

Files in the base directory contain CSS which isn't targeted directly using a class but is compiled into the final CSS output (eg box-sizing or reset). It also contains usful mixins such as breakpoints.

Utilities

Files in utilities contains useful, compact snippets of code which can be accessed directly using a class in your HTML

Note Individual utility files or the main utilities.scss must be one of the last imported partials

Publishing Changes

We use npm version with some custom commit hooks in package.json to handle updating our package version, creating our Git release and tag, and pushing the changes to Github. There's no need to do a git flow release, to manually update the package version in package.json, or to manually merge your code into master and push your tags. We then use npm publish to publish the changes to the registry.

Here's the process for publishing your changes:

  1. Merge your approved changes into develop and pull down develop locally.
  2. Run npm version [patch / minor / major], following normal semantic versioning constraints.
  3. Run npm publish to publish the new version. You can run npm publish --dry-run first to check what you expect to happen actually happens.
  4. Check that the latest version has been published here. It might take a few minutes for the page to update to the latest version.

Install using npm

Before you can use npm, you need to install Node.

Once you've done that, in the root of your project directory, run:

This will install the starter pack in the 'node_modules' directory located in the root of your project.

Importing files located in node_modules

There are two methods of importing the files in this component. You can import them all in one go using the _include-all.scss file. Place the following code at the top of your main Sass file:

Note: You may need to customise the directory path in your imports, relative to where your main Sass file is located. For example:

Alternatively, you can include files individually to only use the files you need for a project. This option probably won't be needed in most cases but it's there if you need it.

Again, the directory path may need updating like the example above.

Notes about specific files

The vast majority of the files in this component don't have any dependencies but occassionally some additional work in your project-specific Sass files will be needed to make use of some features.

Gutters

The gutters file contains a simple Sass loop to give you a base level of options to create space between elements. In order to use this, you'll need to have a $space variable set in your project's Sass config file.

Note: you'll need to ensure your config sits higher in your main Sass file than the gutter import. For example:

Not doing so will throw an error because $space won't be defined if the bower component is called first.

Once this is set, you can use the class in your HTML. By default, you have 10 increments available, u-gutter-bottom-[1-10], the Sass takes the number at the end and multiplies it by the value set to $space. So with the example $space variable set above, the rendered CSS will look like this:

If you need a bottom gutter larger than the default limit, seek help... or just hard-code it in your project. If there is a realistic use-case for increasing the default increments beyond 10, we need to review it before rolling it out.

--

Copyright 2017 Age Partnership Limited

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.