zoontek / parsers

Specify is a central platform for companies who want to unify their brand identity, by connecting their design system tools.

Home Page:https://specifyapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

contributions welcome GitHub Workflow Status Coverage Status Language grade: JavaScript Total alerts Contributors

Specify Parsers

What is Specify?

Specify helps you unify your brand identity by collecting, storing and distributing design tokens and assets—automatically.

What are parsers?

Parsers are functions allowing you to transform design tokens and assets you get from Specify's API.

Parsers are ordered and takes specific input to generate specific output. This way, we can easily test the input coming from the previous parser to check if the whole parsers process will work.

By using parsers, you dictate the way you receive the data from Specify to fit your own needs.

How to create your own parser?

Let's say you want to create a parser named my-parser.

  1. Fork the current repository
  2. Git clone the forked repository
  3. In the directory parsers, create a directory named my-parser
  4. Create your valid parser
  5. Make a PR

Creating a valid parser

To be valid, your parser needs:

Usable libraries

For now, our parsers only use the following libraries:

If you need another library to develop your parser:

  1. Install it using yarn or npm
  2. Import and export it in the parsers/global-libs.ts file

Testing

To easily create and test your parsers, we advise you to use them on design tokens provided in the seeds.json file. It will allow you to use our fake tokens to test your parsers.

To use our design tokens seed:

  1. Import it in your [parser].spec.ts using import * as seeds from '../../seeds.json';
  2. Use the seeds.tokens variable according to your needs.
  3. Launch yarn test to tests your parsers

About

Specify is a central platform for companies who want to unify their brand identity, by connecting their design system tools.

https://specifyapp.com

License:Other


Languages

Language:TypeScript 99.9%Language:JavaScript 0.1%