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

visua

v0.8.0

Published

A tool to describe brand design systems using standard CSS

Downloads

13

Readme

Visua

A tool to describe brand design systems using standard CSS

npm version Build

🛠 This package is still in development: use carefully until a 1.0 release.
Feedback and contributions are welcome!

Documentation

See visua.io for guidance and the full documentation.

Identity files

Visua is built around the concept of identity files: CSS files used as a "config" to store all the characteristics of a brand identity in the form of CSS variables. Something like this:

:root {
    --primary-color: #EFEFEF;
    --secondary-color: #4F4F4F;
    --font-family: 'Raleway', sans-serif;
    --headings-font-family: 'Montserrat', sans-serif;
    --spacer: 1.2em;
}

The package itself consists of a set of tools to work with this type of files, from parsing them to running code generation tasks.

Install

If you want to use visua API in your node project, install it as a normal dependency:

$ npm i visua

and use it in your module:

import {visua, StyleMap} from 'visua';

const styleMap: StyleMap = visua({
    path: 'identity/',
});

If you plan to use it to only run code generation plugins, consider installing it as a devDependency:

$ npm i -D visua

Running plugins

Plugins are small tasks run by the CLI to perform operations on the parsed identity files such as generating themes and assets. visua-bootstrap is a basic plugin that maps a set of common variables to bootstrap scss variables and creates for you a variables.scss file that you can later use to build your themed bootstrap.

Install it by running:

$ npm i -D visua-bootstrap

# Visua plugins are npm packages whose names start with visua-

Create an identity file named identity.css in the project folder and run the plugin:

$ npx visua run bootstrap

Credits

templatel and template string literal tags are modified versions of dedent by Desmond Brand (more in LICENSE).

License

This project is licensed under the MIT License - see the LICENSE file for details.