Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Imar Abreu committed Dec 15, 2023
1 parent 4881ae1 commit 60f288a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/bin/designTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import parserRuntime from 'yargs-parser';
import designTokens from '@/index.ts';
import { logError, configFileParser } from '@/functions';
import { configFileParser, logError } from '@/functions';
import fs from 'fs';

const args = parserRuntime(process.argv.slice(2));

configFileParser(args, fs)
.then(config => designTokens(args, config))
.then(config => designTokens(config))
.catch(err => logError(err));
2 changes: 1 addition & 1 deletion src/functions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export * from './fileIO.ts';
export * from './getTokens.ts';
export * from './logger.ts';
export * from './stringManipulation.ts';
export * from '../styleDictionary/StyleDictionary.ts';
export * from '../styleDictionary/styleDictionary.ts';
export * from './unitsConvert.ts';
export * from './ensureType.ts';
5 changes: 2 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { buildStyleDictionary } from '@/styleDictionary/StyleDictionary.ts';
import { Arguments } from 'yargs-parser';
import { buildStyleDictionary } from '@/styleDictionary/styleDictionary.ts';
import { ParseConfig } from '@/types/designTokens';
import { figmaApiConnection } from '@/api';
import { createJsonTokenFiles, EMOJIS, log } from '@/functions';

const designTokens = (args: Arguments, config: ParseConfig) => {
const designTokens = (config: ParseConfig) => {
const { settings } = config;

figmaApiConnection(settings).then(async generatedTokens => {
Expand Down
File renamed without changes.

0 comments on commit 60f288a

Please sign in to comment.