JSPM

aws-icons-directory

0.0.6
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1581
  • Score
    100M100P100Q117703F
  • License ISC

Package Exports

  • aws-icons-directory

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aws-icons-directory) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

aws-icons-directory

Simple library that takes a CloudFormation resource type as input and returns a best guess SVG icon from the official asset package.

Installation

npm i aws-icon-directory

Example

const { AWSIconDirectory } = require("aws-icons-directory)

const svg = AWSIconDirectory.getSVG("AWS::DynamoDB::Table")

// Also works with SAM resources
const svg = AWSIconDirectory.getSVG("AWS::Serverless::Function")

Known issues

There's no naming convention between CloudFormation resource type names and how the icons are named. The list is generated using string-similarity and some other tweakng. This code can be found and improved under tooling.

I've done some manual testing, but there will be some resource types that are pointing at the wrong icons. Please report these as bugs :-)

It currently only maps on a broad service level and not on feature level. I.e, AWS::Lambda::Function and AWS::Lambda::Permission will both return the Lambda icon.