23 lines
486 B
TypeScript
23 lines
486 B
TypeScript
import { name, version } from '../info.toml'
|
|
import { license, url } from '../../../package.json'
|
|
import colors from '../../../src/palette'
|
|
import type { Colors } from '../../../src/palette'
|
|
|
|
export default function(): any {
|
|
return {
|
|
name,
|
|
version,
|
|
license,
|
|
url,
|
|
...flattenColorsToHex(),
|
|
}
|
|
}
|
|
|
|
function flattenColorsToHex(): Colors {
|
|
return colors.reduce((acc, color) => {
|
|
return {
|
|
[color.nameSnakeCase]: color.toHex(),
|
|
...acc,
|
|
}
|
|
}, {})
|
|
}
|