@symbo.ls/init 1.1.4 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.js +5 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/init",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "license": "MIT",
5
5
  "gitHead": "54fa6500c697604b3f48ba33a573545d7bff35fa",
6
6
  "source": "src/index.js",
@@ -31,9 +31,9 @@
31
31
  "dependencies": {
32
32
  "@domql/utils": "latest",
33
33
  "@symbo.ls/config-default": "latest",
34
+ "@symbo.ls/create-emotion": "^0.0.1",
34
35
  "@symbo.ls/scratch": "latest",
35
- "css-in-props": "latest",
36
- "@emotion/css": "^11.10.0"
36
+ "css-in-props": "latest"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@babel/core": "^7.18.10",
package/src/index.js CHANGED
@@ -15,18 +15,16 @@ import SYMBOLSRC_FILE from '../.symbolsrc.json'
15
15
 
16
16
  import DYNAMIC_JSON from './dynamic.json'
17
17
 
18
- import createEmotion from '@emotion/css/create-instance'
18
+ import createEmotion from '@symbo.ls/create-emotion'
19
19
  import { setClassname } from 'css-in-props'
20
20
 
21
- const { css, injectGlobal } = createEmotion({
22
- key: 'smbls'
23
- })
21
+ const { css, injectGlobal } = createEmotion
24
22
 
25
- export const init = (config, rcfile) => {
23
+ export const init = (config, RC_FILE, options = { emotion: createEmotion }) => {
26
24
  const defaultConfig = config || CONFIG_DEFAULT || SYMBOLSRC_FILE
27
25
 
28
- const RC_FILE = isObject(rcfile) ? rcfile : DYNAMIC_JSON
29
- const resultConfig = deepMerge(RC_FILE, defaultConfig)
26
+ const rcfile = isObject(RC_FILE) ? RC_FILE : DYNAMIC_JSON
27
+ const resultConfig = deepMerge(rcfile, defaultConfig)
30
28
 
31
29
  const conf = set({ verbose: false, ...resultConfig })
32
30
  const FontFace = getFontFaceString(FONT)