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

@fermyon/styleguide

v0.1.8

Published

Re-usable design elements and styles for Fermyon

Downloads

106

Readme

styleguide-logo

A live design reference manual for Fermyon-related materials.

Styleguides are real-life pattern libraries, code standards documents and content style guides — styleguides.io, a wonderful collection.

This styleguide is built as a living, working codebase rather than a simple reference document. It is published as an npm package, so it can be easily imported into other projects and applied as a baseline branded CSS layer.

The styleguide also contains a /docs page (visible here as a website), which contains our brand guidelines, logos, and design resources.

Using The Styleguide

1. Add the styleguide to your project:

npm install -D @fermyon/styleguide
npm install

2. Once installed, the core .scss file can be imported into your project stylesheet as a dependency:

@import "../../node_modules/@fermyon/styleguide/scss/fermyon";

You can see examples of the styleguide being imported into other projects here (fermyon.com site) and here (Spin docs).

3. Re-Compiling Sass to CSS

If your project requires the addition of special, localized styles (which is pretty common), they can be added to your stylesheet underneath the imports shown above. You'll need to re-compile the styles to generate your CSS.

This will likely require the addition of asset build configuration to your project — which depends on the particulars of which tools are being used to generate and run that site/app (for us, that usually means Bartholomew).

Example using vanilla Sass (see fermyon.com here):

sass --watch static/sass/styles.scss static/css/style.css --style compressed

Example using Parcel JS: (see Spin docs):

npx parcel build static/sass/styles.scss --dist-dir static/css --no-optimize

4. Alternatively, just use the CSS as-is:

You can avoid working with Sass/Scss and just use the styleguide as-is by importing the CSS version (along with Bulma) directly into your page. Copy the css/fermyon.css file from the styleguide into your project and include it in the head of the page:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.3/css/bulma.min.css"
        integrity="sha512-IgmDkwzs96t4SrChW29No3NXBIBv8baW490zk5aXvhCD8vuZM3yUSkbyTBcXohkySecyzIrUwiF/qV0cuPcL3Q==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link href="https://fonts.googleapis.com/css2?family=Sen:wght@400;700&amp;display=swap" rel="stylesheet" />
<link rel="stylesheet" href="YOUR_PROJECT_FILEPATH/fermyon.css" />

Note: the CSS should be linked after (i) the bulma.min.css and (ii) Sen webfont CDN requests, as shown above.

Working on Styleguide

To build the styleguide assets, and open the docs/index.html page run:

cd docs
npm run dev

If you just want to rebuild CSS your edits, run:

npm run styles

Changes can be viewed and tested at http://localhost:1234/.

When you have made edits, please commit the updated CSS (css/fermyon.css) in addition to any .scss changes.