ae-biu
Version:
Born For AE, Born To Do
34 lines (27 loc) • 662 B
JavaScript
// @flow
import { resolve } from 'path'
import { workDir } from '../utils/paths'
import pkg from '../utils/package'
// defined in package.json -> ae -> theme
const { ae = {} } = pkg
const { theme = {} } = ae
let projectTheme = theme.ae || {}
if (typeof projectTheme === 'string') {
// relative path
if (projectTheme.charAt(0) === '.') {
projectTheme = resolve(workDir, projectTheme)
}
projectTheme = require(projectTheme)
}
const defaultTheme = {
'white': '#FFFFFF',
'black': '#000000',
'red': '#FF5745',
'blue': '#2D8CF0',
'aside_width': '250px',
'page_min_width': '980px'
}
export default {
...defaultTheme,
...projectTheme
}