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

@tdcerhverv/parrotfish

v3.3.11

Published

TDC Erhverv - Shared Styles constants imported from Figma

Downloads

888

Readme

Parrotfish

IMPORTANT NOTE: dist is part of the repo to have control over what icons are being build with what version of parrotfish, see 2. Versioning strategy

Builds ready-to-use react components and svg files directly from figma.

Uses figma api: https://www.figma.com/developers/docs.

Build assets using npm run generate-all - will auto-generate svg files and react component from figma.

Pushing to master is not allowed; please create a branch.

Be sure to follow steps

  1. UI Upgrades
  2. Versioning strategy for any new additions and create a pull-request on github against the master branch.

Questions? Reach out to:

UI Upgrades (for adding new icons / colors, or changing existing)

In case of UI Upgrades started in UX Chapter (such as new CVI), the following describe the process for bumping new versions of design tokens:

  • Make sure the Figma page ids are passed correctly in all necessary generateDesignToken(SourceFigmaPages, DesignTokens); the parameters are controlled by enums found in ./enums/*.enums.ts
  • npm run generate-all or npm run generate-colors or npm run generate-icons
  • npm version major, commit and push in order to trigger auto-publish; then npm install @tdc-packages/[email protected] the new version you just created in your project.

Need help debugging? See debug section

Versioning strategy

This package is NOT using semver conventions, due to the need of versioning both code & assets. Therefore, use these guidelines when applying npm version <versionType>:

  • major: UX chapter specifically names a CVI-version (optional) and changes all assets entirely
  • minor: breaking code changes
  • patch: new icon added / new color added in Figma

!! Please update the ./packages/parrotfish/CHANGELOG.md with all changes referred above.

Debug

PREREQUISITES: follow Figma's authentication guide and once you've got a developer access token, add it to your environment variables, mapped to FIGMA_TOKEN

  • npm run generate-all if all design-tokens have changed and check if the generated assets look correct.
  • Fragmented approach: (see package.json/scripts)
    • npm run generate-colors for fetching new colors from figma;
    • npm run generate-icons for fetching new icons from figma;
    • npm run generate-react-icons for generating react components from icons from figma;

Usage

Install via npm i @tdcerhverv/parrotfish;

Please note using the SVG icons requires you to have something like @svgr/parcel-plugin-svgr (>= 4.x) installed, if you are using Parceljs of course. 😉

React Component Icon example:

import AccountNumber from '@tdcerhverv/parrotfish/icons/AccountNumber';

SVG icon example

import Account_number from '@tdcerhverv/parrotfish/dist/icons/Icons/Account_number.svg';

Design tokens

  • SCSS color variables:
    • using GET: https://api.figma.com/v1/files/FIGMA-COLOR-FILE-ID
    • color pages:
      • master 1.5: CWDhhHgxEb7AEQFKl56RHGvt
      • developer + ux signoff color page ID: Xx1z0Lcl7j8JhXwFLTU3sdbB << currently in use
    • should be imported from dist/colors-design-token.scss
    • format: $color-cerulean-blue-40: rgba(255, 0, 130, 1);
    • theme format (recommended): map-get('primary', $theme);
  • TS color variables:
    • using GET: https://api.figma.com/v1/files/FIGMA-COLOR-FILE-ID
    • color pages:
      • master 1.5: CWDhhHgxEb7AEQFKl56RHGvt
      • developer + ux signoff color page ID: Xx1z0Lcl7j8JhXwFLTU3sdbB << currently in use
    • should be imported from dist/colors-design-token.ts
    • format: theme.primaryLight: '#2d80d3'
    • colorsMap exported as default. keys are formatted with camelCase (example: primary-light -> primaryLight)
  • Icon SVG:
    • using GET: https://api.figma.com/v1/files/FIGMA-ICONS-FILE-ID & subsequent recursive https://api.figma.com/v1/images/M2McmXIlBunFDCdim0z5anm4?ids=FIGMA_IDS_COMMA_SEPARATED&format=svg
    • required peer dependency: @svgr/parcel-plugin-svgr
    • icons pages:
      • shared components / icons: M2McmXIlBunFDCdim0z5anm4
    • should be imported from dist/icons/ICON_GROUP/ICON_NAME
    • example: import Account_number from '@tdcerhverv/parrotfish/dist/icons/Regular/Account_number.svg'