@symbo.ls/init
Advanced tools
Comparing version 2.10.25 to 2.10.31
18
index.js
@@ -10,3 +10,2 @@ 'use strict' | ||
import { isObject, deepMerge } from '@domql/utils' | ||
import { initDOMQLEmotion } from 'domql/packages/emotion' | ||
@@ -28,9 +27,6 @@ import { emotion as defaultEmotion } from '@symbo.ls/emotion' | ||
useVariable: true, | ||
useReset: true, | ||
initDOMQLDefine: true | ||
useReset: true | ||
} | ||
export const init = (config, RC_FILE, options = SET_OPTIONS) => { | ||
if (options.initDOMQLDefine) initDOMQLEmotion(options.emotion, options) | ||
const resultConfig = prepareInit(config, RC_FILE) | ||
@@ -40,4 +36,5 @@ const emotion = options.emotion || defaultEmotion | ||
const conf = set({ | ||
verbose: false, | ||
verbose: options.verbose, | ||
useReset: options.useReset, | ||
useVariable: options.useVariable, | ||
...resultConfig | ||
@@ -48,5 +45,8 @@ }, { newConfig: options.newConfig }) | ||
const useReset = conf.useReset | ||
const useVariable = conf.useVariable | ||
emotion.injectGlobal(FontFace) | ||
if (options.useVariable) emotion.injectGlobal({ ':root': conf.CSS_VARS }) | ||
if (options.useReset) emotion.injectGlobal(conf.RESET) | ||
if (useVariable) emotion.injectGlobal({ ':root': conf.CSS_VARS }) | ||
if (useReset) emotion.injectGlobal(conf.RESET) | ||
@@ -62,3 +62,3 @@ return conf | ||
}) | ||
options.emotion.injectGlobal({ ':root': conf.CSS_VARS }) | ||
options.emotion.injectGlobal({':root': conf.CSS_VARS }) | ||
options.emotion.injectGlobal(conf.RESET) | ||
@@ -65,0 +65,0 @@ } |
{ | ||
"name": "@symbo.ls/init", | ||
"version": "2.10.25", | ||
"version": "2.10.31", | ||
"license": "MIT", | ||
"gitHead": "891c18159d1045914b41f121474c6b707ac9db83", | ||
"gitHead": "828e14653b4f33040eaf9f42ba4adcc5111feb91", | ||
"source": "index.js", | ||
@@ -7,0 +7,0 @@ "main": "index.js", |
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
2987