Browse Source

feat(core options / config)

Ryan Chandler 5 years ago
parent
commit
d2b798b0bc
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/index.js

+ 8 - 0
src/index.js

@@ -2,6 +2,10 @@ import { domReady, buildInitExpression } from './utils'
 import { createObservable } from './observable'
 
 const Spruce = {
+    options: {
+        globalStoreVariable: false,
+    },
+
     stores: {},
 
     subscribers: [],
@@ -37,6 +41,10 @@ const Spruce = {
                 el.__x.$data.spruce = [key, value]
             }
         })
+    },
+
+    config(options = {}) {
+        this.options = Object.assign(this.options, options)
     }
 }