@symbo.ls/init
Advanced tools
Comparing version 2.6.8 to 2.6.9
{ | ||
"name": "@symbo.ls/init", | ||
"version": "2.6.8", | ||
"version": "2.6.9", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa", |
@@ -20,3 +20,2 @@ 'use strict' | ||
const prepareInit = (config = {}, RC_FILE) => { | ||
// const defaultConfig = merge(config, CONFIG_DEFAULT) | ||
const rcfile = isObject(RC_FILE) ? RC_FILE : DYNAMIC_JSON || {} | ||
@@ -26,12 +25,24 @@ return deepMerge(config, rcfile) | ||
export const init = (config, RC_FILE, options = { emotion, initDOMQLDefine: true }) => { | ||
const SET_OPTIONS = { | ||
emotion, | ||
useVariable: true, | ||
useReset: true, | ||
initDOMQLDefine: true | ||
} | ||
export const init = (config, RC_FILE, options = SET_OPTIONS) => { | ||
if (options.initDOMQLDefine) initDOMQLEmotion(options.emotion, options) | ||
const resultConfig = prepareInit(config) | ||
const resultConfig = prepareInit(config, RC_FILE) | ||
const conf = set({ verbose: false, ...resultConfig }, { newConfig: options.newConfig }) | ||
const conf = set({ | ||
verbose: false, | ||
useReset: options.useReset, | ||
...resultConfig | ||
}, { newConfig: options.newConfig }) | ||
const FontFace = getFontFaceString(conf.FONT) | ||
options.emotion.injectGlobal(FontFace) | ||
if (conf.useReset) options.emotion.injectGlobal(conf.RESET) | ||
if (options.useReset) options.emotion.injectGlobal(conf.RESET) | ||
@@ -38,0 +49,0 @@ return conf |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2738
41