New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

visua

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

visua

A tool to describe brand design systems using standard CSS

  • 0.8.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 27 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc