Socket
Book a DemoInstallSign in
Socket

@design-sync/manager

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@design-sync/manager

Plugable design tokens manager

latest
Source
npmnpm
Version
0.6.3
Version published
Maintainers
1
Created
Source

@design-sync/manager

npm version npm downloads

Plugable design tokens manager

Usage

Install package:

# npm
npm install @design-sync/manager

# yarn
yarn add @design-sync/manager

# pnpm
pnpm install @design-sync/manager

# bun
bun install @design-sync/manager

Usage:

import { TokensManager } from '@design-sync/manager'

const tokensManager = new TokensManager();
tokensManager.use({
  name: 'my-plugin',
  build: async (manager) => {
    const walker = manager.getWalker();
    walker.walk((token) => {
      // do something with token
    });

    return [{
     name: 'my-plugin-emitted-file.css',
     content: 'transformed tokens or whatever',
    }];
  },
});
// what will happen? 
// 1. resolve config from .design-sync.config file in current working directory or user home directory
// 2. override config with the provided config
// 3. fetch tokens from the provided uri or use the provided tokens
// 4. run plugins
// 5. write emitted files to disk
await tokensManager.run({
  // override config
  uri: 'gh:owner/repo#branch',
});
console.log("done");

Development

  • Clone this repository
  • Install latest LTS version of Node.js
  • Enable Corepack using corepack enable
  • Install dependencies using pnpm install
  • Run interactive tests using pnpm dev

License

Made with 💛

Published under MIT License.

FAQs

Package last updated on 06 Jun 2024

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.