diff --git a/src/android/__tests__/android.test.ts b/src/android/__tests__/android.test.ts index cb28733..2626d58 100644 --- a/src/android/__tests__/android.test.ts +++ b/src/android/__tests__/android.test.ts @@ -2,7 +2,7 @@ import StyleDictionaryPackage from 'style-dictionary' import { clearOutput, fileExists, fileToString } from '../../common/helpers' import { createConfig } from '../config' import { ColorFilename, SpacingFilename, TypeFilename } from '../constants' -import { readOptionsAsJson } from '../helpers' +import { readJsonFileAsOptions } from '../helpers' import { styleDictionaryRegistrations } from '../styleDictionaryRegistrations' import { AndroidJsonOptions } from '../types' @@ -19,7 +19,7 @@ describe('android', () => { beforeAll(() => { const { input, configPath } = config - options = readOptionsAsJson(configPath) + options = readJsonFileAsOptions(configPath) styleDictionaryRegistrations(options) diff --git a/src/android/index.ts b/src/android/index.ts index b9ba3cb..d71dd49 100644 --- a/src/android/index.ts +++ b/src/android/index.ts @@ -2,7 +2,7 @@ import StyleDictionaryPackage from 'style-dictionary' import { AndroidConfig } from '../design.types' import { createConfig } from './config' -import { readOptionsAsJson } from './helpers' +import { readJsonFileAsOptions } from './helpers' import { styleDictionaryRegistrations } from './styleDictionaryRegistrations' export const setup = (androidConfig: AndroidConfig) => { @@ -10,14 +10,14 @@ export const setup = (androidConfig: AndroidConfig) => { const { configPath, input } = androidConfig - const config = readOptionsAsJson(configPath) + const options = readJsonFileAsOptions(configPath) - console.log('Using options') + console.log('Using options', options) - styleDictionaryRegistrations(config) + styleDictionaryRegistrations(options) const StyleDictionary = StyleDictionaryPackage.extend( - createConfig(input, config), + createConfig(input, options), ) console.log('Building for platform Android') diff --git a/src/android/styleDictionaryRegistrations.ts b/src/android/styleDictionaryRegistrations.ts index ee413e4..f056ac1 100644 --- a/src/android/styleDictionaryRegistrations.ts +++ b/src/android/styleDictionaryRegistrations.ts @@ -1,5 +1,4 @@ import StyleDictionaryPackage from 'style-dictionary' -import { AndroidConfig } from '../design.types' import { useTemplate } from '../utils' import { TEMPLATES } from './constants' import { colorFormatter } from './formatters/colorFormatter'