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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@admiral-ds/pixso-cli

v1.0.1

Published

Pixso Tokens Extractor

Readme

Pixso Tokens Extractor

Описание

Этот скрипт предназначен для автоматического извлечения токенов (данных тем) из Pixso. Он позволяет разработчикам различных платформ (Web, Mobile, iOS, Android, Flutter) получать данные о цветах и тенях в удобном формате, без необходимости вручную копировать значения.

Конфигурация

Скрипт использует массив объектов с настройками. Каждый объект массива описывает правила для форматирования выгружаемых данных в итоговый файл, количество элементов массива соответствует количеству файлов, в которых появятся данные. Результатом работы скрипта будет являться содержимое переменной с названием, которое будет указано для поля name. Массив items хранит описание правил для данных каждой перменой. Пример:

[
  {
    "platform": "WEB",
    "outputFilePath": "path/to/file.ts",
    "items": [
      {
        "type": "COLOR",
        "name": "primaryColor",
        "apiBaseUrl": "https://api.pixso.com",
        "fileKey": "someFileKey",
        "transformRules": {
          "removePercent": true,
          "keepOnlyFirstUnderscore": false,
          "sort": true,
          "namingConvention": "camelCase"
        }
      }
    ]
  }
]

Установка

npm install
npm install -g .

Использование

pixso-cli run

После запуска скрипта начнётся диалог с пользователем для настройки параметров выгрузки.

Процесс работы

  1. Выбор платформы

    Choose platform:
    1 - WEB
    2 - MOBILE
    3 - IOS
    4 - ANDROID
    5 - FLUTTER

    Введите число, соответствующее нужной платформе.

  2. Указание пути к файлу

    Enter the output file path with file extension, like color.dark.ts or color.dark.swift:

    Введите абсолютный путь до существующего файла, куда будут записаны данные.

  3. Добавление переменных

    • Выбор типа данных:

      Enter item type (COLOR or SHADOW):

      Введите COLOR или SHADOW.

    • Указание имени переменной:

      Enter name (e.g., color or boxShadow):

      Введите название переменной.

    • Указание API URL:

      Enter API URL (e.g., https://pixso.t1-pixso.ru):

      Введите URL API.

    • Указание fileKey (e.g., uSjNAVkKdwGPfIy3S72-cA для светлой или iz8Z0ubn2rLfpEcJQD__tg для тёмной тем):

      Enter fileKey:

      Введите идентификатор файла в дизайнерской системе.

    • Шаблонный путь (если не нужен, нажмите Enter):

      Enter template path (leave empty if not needed):
    • Опции форматирования:

      Remove percentage from names? (true/false):
      Keep only the first underscore? (true/false):
      Sort items? (true/false):
      Choose a naming convention:
      1 - camelCase
      2 - PascalCase
      3 - snake_case
      4 - SCREAMING_SNAKE_CASE
      5 - kebab-case
      6 - flatcase
      7 - none

      Введите число, соответствующее нужному формату.

  4. Добавление дополнительных переменных

    Add another item? (yes/no)

    Если yes, повторите шаги 3.1–3.8.

  5. Добавление другой темы (например, тёмной)

    Add another theme? (yes/no)

    Если yes, повторите шаги 1–4.

Итог

После завершения работы скрипта в указанные файлы будут записаны объекты с токенами, готовыми к использованию.

Пример результата:

export const themeColors = {
  primary: "#FF5733",
  secondary: "#33FF57"
};

Теперь вы можете легко получать данные тем из Pixso в нужном формате!