Skip to content

Commit 1e9a29b

Browse files
committed
refactoring
1 parent 7c24807 commit 1e9a29b

File tree

27 files changed

+468
-505
lines changed

27 files changed

+468
-505
lines changed

client/webpack.config.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

connect.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

dist/plugin.js

Lines changed: 3 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,4 @@
1-
module.exports =
2-
/******/ (function(modules) { // webpackBootstrap
3-
/******/ // The module cache
4-
/******/ var installedModules = {};
5-
6-
/******/ // The require function
7-
/******/ function __webpack_require__(moduleId) {
8-
9-
/******/ // Check if module is in cache
10-
/******/ if(installedModules[moduleId])
11-
/******/ return installedModules[moduleId].exports;
12-
13-
/******/ // Create a new module (and put it into the cache)
14-
/******/ var module = installedModules[moduleId] = {
15-
/******/ i: moduleId,
16-
/******/ l: false,
17-
/******/ exports: {}
18-
/******/ };
19-
20-
/******/ // Execute the module function
21-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22-
23-
/******/ // Flag the module as loaded
24-
/******/ module.l = true;
25-
26-
/******/ // Return the exports of the module
27-
/******/ return module.exports;
28-
/******/ }
29-
30-
31-
/******/ // expose the modules object (__webpack_modules__)
32-
/******/ __webpack_require__.m = modules;
33-
34-
/******/ // expose the module cache
35-
/******/ __webpack_require__.c = installedModules;
36-
37-
/******/ // identity function for calling harmony imports with the correct context
38-
/******/ __webpack_require__.i = function(value) { return value; };
39-
40-
/******/ // define getter function for harmony exports
41-
/******/ __webpack_require__.d = function(exports, name, getter) {
42-
/******/ if(!__webpack_require__.o(exports, name)) {
43-
/******/ Object.defineProperty(exports, name, {
44-
/******/ configurable: false,
45-
/******/ enumerable: true,
46-
/******/ get: getter
47-
/******/ });
48-
/******/ }
49-
/******/ };
50-
51-
/******/ // getDefaultExport function for compatibility with non-harmony modules
52-
/******/ __webpack_require__.n = function(module) {
53-
/******/ var getter = module && module.__esModule ?
54-
/******/ function getDefault() { return module['default']; } :
55-
/******/ function getModuleExports() { return module; };
56-
/******/ __webpack_require__.d(getter, 'a', getter);
57-
/******/ return getter;
58-
/******/ };
59-
60-
/******/ // Object.prototype.hasOwnProperty.call
61-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
62-
63-
/******/ // __webpack_public_path__
64-
/******/ __webpack_require__.p = "";
65-
66-
/******/ // Load entry module and return exports
67-
/******/ return __webpack_require__(__webpack_require__.s = 1);
68-
/******/ })
69-
/************************************************************************/
70-
/******/ ([
71-
/* 0 */
72-
/***/ (function(module, exports, __webpack_require__) {
73-
74-
"use strict";
75-
1+
'use strict';
762

773
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
784

@@ -83,23 +9,13 @@ vueEasyRenderer.install = function (Vue, options) {
839
if (this.$isServer || this.$parent) return;
8410
var initState = window.__VUE_INITIAL_STATE__; //eslint-disable-line
8511
if (this.$options.store && initState) {
86-
this.$options.store.replaceState(_extends(this.$options.store.state, initState));
12+
this.$options.store.replaceState(_extends({}, this.$options.store.state, initState));
8713
} else {
8814
var data = typeof this.$options.data === 'function' ? this.$options.data.call(this) : this.$options.data || {};
89-
this.$options.data = _extends(data, initState || {});
15+
this.$options.data = _extends({}, data, initState);
9016
}
9117
}
9218
});
9319
};
9420

9521
module.exports = vueEasyRenderer;
96-
97-
/***/ }),
98-
/* 1 */
99-
/***/ (function(module, exports, __webpack_require__) {
100-
101-
module.exports = __webpack_require__(0);
102-
103-
104-
/***/ })
105-
/******/ ]);

flow/modules.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,8 @@ declare module 'vue' {
5555
}
5656

5757
declare module 'vue-server-renderer' {
58-
declare type RenderCallback = (err: Error | null, html: string) => void;
5958
declare class VueServerRenderer {
60-
renderToString(vm: Vue, context?: Object, callback: RenderCallback): string;
59+
renderToString(vm: Vue, context: any, callback: any): string;
6160
renderToStream(vm: Vue, context?: Object): Readable;
6261
}
6362
declare module.exports :{
@@ -72,3 +71,7 @@ declare module 'vuex' {
7271
declare module 'vue-router' {
7372
declare module.exports :{ }
7473
}
74+
75+
declare module 'memory-fs' {
76+
declare module.exports: FileSystem;
77+
}

koa.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)