Socket
Socket
Sign inDemoInstall

@duetds/icons

Package Overview
Dependencies
0
Maintainers
3
Versions
245
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @duetds/icons

This package includes Duet Design System Icons and related utilities.


Version published
Weekly downloads
222
decreased by-29.52%
Maintainers
3
Install size
1.47 MB
Created
Weekly downloads
 

Readme

Source

Build Status Version

Duet Icons

This package includes Duet Icons and related tools.

Usage

For usage instructions, please see Duet Design System documentation.

Architecture

This package uses sass-lint, svglint, jsonlint to lint.

The file scripts/prepublish.js is used to build the package for publishing.

On build, each icon under the assets directory is converted to an individual CommonJS module. Each of these modules exports an object matching the following type:

type DuetIcon = {
  tags: string // space-separated list of tags
  title: string
  svg: string
}

A Typescript type DuetIconName is exposed which enumerates all icon names:

type DuetIconName = "action-add" | "action-add-small" // etc

The main file of the package exports a single object, containing all icons, which conforms to the following type:

type DuetIcons = Record<DuetIconName, DuetIcon>

Adding new icons

  1. Name new SVG icons following Duet’s icon naming guidelines and put them inside src/assets directory.
  2. If SVG Icon has not been optimized it must be done with either SVGO in command line or in web version of SVGO. Use default settings on web.
  3. Next, run npm run tags which will assist you in adding tags for any new icons.
  4. Finally, run npm run build to generate a new build.

Copyright © 2020 LocalTapiola/Turva.

FAQs

Last updated on 19 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc