@symbo.ls/create 2.9.10 → 2.9.13

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/index.js +13 -7
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -23,11 +23,12 @@ const defaultOptions = {
23
23
  }
24
24
 
25
25
  export const create = (App, options = defaultOptions) => {
26
- const { components, define } = options
27
26
  const designSystem = init(options.system)
28
27
 
29
28
  const appIsKey = isString(App)
30
29
  const key = options.key || SYMBOLS_KEY || (appIsKey && App)
30
+
31
+ console.log(App, options, key)
31
32
 
32
33
  if (appIsKey) App = {}
33
34
  if (key) {
@@ -35,20 +36,25 @@ export const create = (App, options = defaultOptions) => {
35
36
  const data = fetch(key)
36
37
  overwriteDeep(data, options)
37
38
  }
38
- else options = DYNAMIC_JSON
39
39
  }
40
40
 
41
+ const { define } = options
41
42
  if (define) DOM.define(options.define)
42
43
 
44
+ console.log(options.state)
45
+
43
46
  return DOM.create({
44
- extend: App,
45
- routes: options.pages,
46
- state: options.state,
47
+ extend: [App, {
48
+ routes: options.pages,
49
+ state: options.state
50
+ }]
47
51
  }, null, 'app', {
48
52
  extend: [smbls.Box],
49
53
  context: {
50
- components: { ...smbls, ...components },
51
- system: designSystem
54
+ components: { ...smbls, ...options.components },
55
+ state: options.state,
56
+ pages: options.pages,
57
+ system: designSystem,
52
58
  },
53
59
  // TODO: move define here,
54
60
  })
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@symbo.ls/create",
3
- "version": "2.9.10",
3
+ "version": "2.9.13",
4
4
  "license": "MIT",
5
- "gitHead": "e7e2ad37403518d13a611379ab6278934c260bb5",
5
+ "gitHead": "e545a87ed2dfa8fb6258db285fe9b925553f0467",
6
6
  "source": "index.js",
7
7
  "main": "index.js",
8
8
  "dependencies": {