Skip to content

Commit

Permalink
fix: naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreydelooff committed Aug 25, 2022
1 parent eb813ff commit ac0ab9d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/android/__tests__/android.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -19,7 +19,7 @@ describe('android', () => {
beforeAll(() => {
const { input, configPath } = config

options = readOptionsAsJson(configPath)
options = readJsonFileAsOptions(configPath)

styleDictionaryRegistrations(options)

Expand Down
10 changes: 5 additions & 5 deletions src/android/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ 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) => {
console.log('Setting up Android', 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')
Expand Down
1 change: 0 additions & 1 deletion src/android/styleDictionaryRegistrations.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit ac0ab9d

Please sign in to comment.