0.6.1 • Published 5 months ago

@design-sync/manager v0.6.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@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.

0.6.1

5 months ago

0.6.0

5 months ago

0.5.2

5 months ago

0.5.0

6 months ago

0.5.1

6 months ago

0.4.1

6 months ago

0.4.0

6 months ago

0.3.0

6 months ago

0.2.1

6 months ago

0.2.0

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago