@symbo.ls/create 2.10.168 → 2.10.171
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.
- package/index.js +2 -26
- package/initEmotion.js +1 -1
- package/options.js +28 -0
- package/package.json +2 -2
- package/router.js +0 -2
package/index.js
CHANGED
|
@@ -6,39 +6,15 @@ import { deepMerge, isObject, isString } from '@domql/utils'
|
|
|
6
6
|
import * as utils from './utilImports'
|
|
7
7
|
import * as uikit from '@symbo.ls/uikit'
|
|
8
8
|
|
|
9
|
-
import { emotion as defaultEmotion } from '@symbo.ls/emotion'
|
|
10
|
-
|
|
11
9
|
import { defaultDefine } from './define'
|
|
12
10
|
import { initRouter } from './router'
|
|
13
11
|
import { fetchAsync, fetchSync } from './ferchOnCreate'
|
|
14
12
|
import { initEmotion } from './initEmotion'
|
|
15
13
|
|
|
14
|
+
import { DEFAULT_CREATE_OPTIONS } from './options'
|
|
16
15
|
import DYNAMIC_JSON from '@symbo.ls/init/dynamic.json'
|
|
17
|
-
const SYMBOLS_KEY = process.env.SYMBOLS_KEY
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
editor: {
|
|
21
|
-
endpoint: 'api.symbols.app'
|
|
22
|
-
},
|
|
23
|
-
state: {},
|
|
24
|
-
pages: {},
|
|
25
|
-
designSystem: {
|
|
26
|
-
useReset: true,
|
|
27
|
-
useVariable: true,
|
|
28
|
-
useIconSprite: true,
|
|
29
|
-
useSvgSprite: true,
|
|
30
|
-
useFontImport: true
|
|
31
|
-
},
|
|
32
|
-
components: {},
|
|
33
|
-
initOptions: {
|
|
34
|
-
emotion: defaultEmotion
|
|
35
|
-
},
|
|
36
|
-
router: {
|
|
37
|
-
initRouter: true,
|
|
38
|
-
injectRouterInLinkComponent: true
|
|
39
|
-
},
|
|
40
|
-
define: defaultDefine
|
|
41
|
-
}
|
|
17
|
+
const SYMBOLS_KEY = process.env.SYMBOLS_KEY
|
|
42
18
|
|
|
43
19
|
const mergeWithLocalFile = (options, RC_FILE) => {
|
|
44
20
|
const rcfile = isObject(RC_FILE) ? RC_FILE : DYNAMIC_JSON || {}
|
package/initEmotion.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { transformDOMQLEmotion } from '@domql/emotion'
|
|
4
4
|
import { emotion as defaultEmotion } from '@symbo.ls/emotion'
|
|
5
5
|
import { init } from '@symbo.ls/init'
|
|
6
|
-
import { DEFAULT_CREATE_OPTIONS } from '
|
|
6
|
+
import { DEFAULT_CREATE_OPTIONS } from './options'
|
|
7
7
|
|
|
8
8
|
export const initEmotion = (key, options = DEFAULT_CREATE_OPTIONS) => {
|
|
9
9
|
const doc = options.parent || options.document || document
|
package/options.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { defaultDefine } from './define'
|
|
4
|
+
import { emotion as defaultEmotion } from '@symbo.ls/emotion'
|
|
5
|
+
|
|
6
|
+
export const DEFAULT_CREATE_OPTIONS = {
|
|
7
|
+
editor: {
|
|
8
|
+
endpoint: 'api.symbols.app'
|
|
9
|
+
},
|
|
10
|
+
state: {},
|
|
11
|
+
pages: {},
|
|
12
|
+
designSystem: {
|
|
13
|
+
useReset: true,
|
|
14
|
+
useVariable: true,
|
|
15
|
+
useIconSprite: true,
|
|
16
|
+
useSvgSprite: true,
|
|
17
|
+
useFontImport: true
|
|
18
|
+
},
|
|
19
|
+
components: {},
|
|
20
|
+
initOptions: {
|
|
21
|
+
emotion: defaultEmotion
|
|
22
|
+
},
|
|
23
|
+
router: {
|
|
24
|
+
initRouter: true,
|
|
25
|
+
injectRouterInLinkComponent: true
|
|
26
|
+
},
|
|
27
|
+
define: defaultDefine
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/create",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.171",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"gitHead": "
|
|
5
|
+
"gitHead": "6be38bfad2d2bbcaf279e2b4fc81d8b5bbda30be",
|
|
6
6
|
"source": "index.js",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"dependencies": {
|
package/router.js
CHANGED
|
@@ -13,8 +13,6 @@ export const initRouter = (root, options = DEFAULT_ROUTING_OPTIONS) => {
|
|
|
13
13
|
if (options === false) return
|
|
14
14
|
if (options === true) options = DEFAULT_ROUTING_OPTIONS
|
|
15
15
|
|
|
16
|
-
console.log(options)
|
|
17
|
-
|
|
18
16
|
const onRender = (el, s) => {
|
|
19
17
|
if (el.routes) router(el, window.location.pathname, {})
|
|
20
18
|
}
|