Browse Source

[build] 0.4.2

Evan You 9 years ago
parent
commit
aeb71ab509
3 changed files with 22 additions and 12 deletions
  1. 20 10
      dist/vuex.js
  2. 1 1
      dist/vuex.min.js
  3. 1 1
      package.json

+ 20 - 10
dist/vuex.js

@@ -1,13 +1,13 @@
 /*!
 /*!
- * Vuex v0.4.1
+ * Vuex v0.4.2
  * (c) 2016 Evan You
  * (c) 2016 Evan You
  * Released under the MIT License.
  * Released under the MIT License.
  */
  */
 (function (global, factory) {
 (function (global, factory) {
-  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
-  typeof define === 'function' && define.amd ? define(['exports'], factory) :
-  (factory((global.Vuex = global.Vuex || {})));
-}(this, function (exports) { 'use strict';
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global.Vuex = factory());
+}(this, function () { 'use strict';
 
 
   var babelHelpers = {};
   var babelHelpers = {};
   babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
   babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
@@ -364,6 +364,20 @@
         this._setupModuleMutations(modules || this._modules);
         this._setupModuleMutations(modules || this._modules);
       }
       }
 
 
+      /**
+       * Replace entire state tree.
+       */
+
+    }, {
+      key: 'replaceState',
+      value: function replaceState(newState) {
+        var state = this._vm._data;
+        var clone = deepClone(newState);
+        Object.keys(clone).forEach(function (key) {
+          state[key] = clone[key];
+        });
+      }
+
       /**
       /**
        * Attach sub state tree of each module to the root tree.
        * Attach sub state tree of each module to the root tree.
        *
        *
@@ -491,16 +505,12 @@
     override(Vue);
     override(Vue);
   }
   }
 
 
-  // also export the default
   var index = {
   var index = {
     Store: Store,
     Store: Store,
     install: install,
     install: install,
     createLogger: createLogger
     createLogger: createLogger
   };
   };
 
 
-  exports.Store = Store;
-  exports.install = install;
-  exports.createLogger = createLogger;
-  exports['default'] = index;
+  return index;
 
 
 }));
 }));

File diff suppressed because it is too large
+ 1 - 1
dist/vuex.min.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "vuex",
   "name": "vuex",
-  "version": "0.4.1",
+  "version": "0.4.2",
   "description": "state management for Vue.js",
   "description": "state management for Vue.js",
   "main": "dist/vuex.js",
   "main": "dist/vuex.js",
   "files": [
   "files": [

Some files were not shown because too many files changed in this diff