소스 검색

[build] 0.4.2

Evan You 9 년 전
부모
커밋
aeb71ab509
3개의 변경된 파일22개의 추가작업 그리고 12개의 파일을 삭제
  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
  * Released under the MIT License.
  */
 (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 = {};
   babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
@@ -364,6 +364,20 @@
         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.
        *
@@ -491,16 +505,12 @@
     override(Vue);
   }
 
-  // also export the default
   var index = {
     Store: Store,
     install: install,
     createLogger: createLogger
   };
 
-  exports.Store = Store;
-  exports.install = install;
-  exports.createLogger = createLogger;
-  exports['default'] = index;
+  return index;
 
 }));

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
dist/vuex.min.js


+ 1 - 1
package.json

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

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.