Add server; add node_modules; add public folder; add package.json
This commit is contained in:
1 parent
d233c123cf
commit
538894d4a6
592 files changed
+142682
-118
No files matched your search
+124
@@ -0,0 +1,124 @@
|
||||
## Explanation of Build Files
|
||||
|
||||
| | UMD | CommonJS | ES Module |
|
||||
| --- | --- | --- | --- |
|
||||
| **Full** | vue.js | vue.common.js | vue.esm.js |
|
||||
| **Runtime-only** | vue.runtime.js | vue.runtime.common.js | vue.runtime.esm.js |
|
||||
| **Full (production)** | vue.min.js | | |
|
||||
| **Runtime-only (production)** | vue.runtime.min.js | | |
|
||||
|
||||
### Terms
|
||||
|
||||
- **Full**: builds that contains both the compiler and the runtime.
|
||||
|
||||
- **Compiler**: code that is responsible for compiling template strings into JavaScript render functions.
|
||||
|
||||
- **Runtime**: code that is responsible for creating Vue instances, rendering and patching virtual DOM, etc. Basically everything minus the compiler.
|
||||
|
||||
- **[UMD](https://github.com/umdjs/umd)**: UMD builds can be used directly in the browser via a `<script>` tag. The default file from Unpkg CDN at [https://unpkg.com/vue](https://unpkg.com/vue) is the Runtime + Compiler UMD build (`vue.js`).
|
||||
|
||||
- **[CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1)**: CommonJS builds are intended for use with older bundlers like [browserify](http://browserify.org/) or [webpack 1](https://webpack.github.io). The default file for these bundlers (`pkg.main`) is the Runtime only CommonJS build (`vue.runtime.common.js`).
|
||||
|
||||
- **[ES Module](http://exploringjs.com/es6/ch_modules.html)**: ES module builds are intended for use with modern bundlers like [webpack 2](https://webpack.js.org) or [rollup](http://rollupjs.org/). The default file for these bundlers (`pkg.module`) is the Runtime only ES Module build (`vue.runtime.esm.js`).
|
||||
|
||||
### Runtime + Compiler vs. Runtime-only
|
||||
|
||||
If you need to compile templates on the fly (e.g. passing a string to the `template` option, or mounting to an element using its in-DOM HTML as the template), you will need the compiler and thus the full build.
|
||||
|
||||
When using `vue-loader` or `vueify`, templates inside `*.vue` files are compiled into JavaScript at build time. You don't really need the compiler in the final bundle, and can therefore use the runtime-only build.
|
||||
|
||||
Since the runtime-only builds are roughly 30% lighter-weight than their full-build counterparts, you should use it whenever you can. If you wish to use the full build instead, you need to configure an alias in your bundler.
|
||||
|
||||
#### Webpack
|
||||
|
||||
``` js
|
||||
module.exports = {
|
||||
// ...
|
||||
resolve: {
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue.esm.js' // 'vue/dist/vue.common.js' for webpack 1
|
||||
}
|
||||
}
|
||||
}
|
||||
````
|
||||
|
||||
#### Rollup
|
||||
|
||||
``` js
|
||||
const alias = require('rollup-plugin-alias')
|
||||
|
||||
rollup({
|
||||
// ...
|
||||
plugins: [
|
||||
alias({
|
||||
'vue': 'vue/dist/vue.esm.js'
|
||||
})
|
||||
]
|
||||
})
|
||||
```
|
||||
|
||||
#### Browserify
|
||||
|
||||
Add to your project's `package.json`:
|
||||
|
||||
``` js
|
||||
{
|
||||
// ...
|
||||
"browser": {
|
||||
"vue": "vue/dist/vue.common.js"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Development vs. Production Mode
|
||||
|
||||
Development/production modes are hard-coded for the UMD builds: the un-minified files are for development, and the minified files are for production.
|
||||
|
||||
CommonJS and ES Module builds are intended for bundlers, therefore we don't provide minified versions for them. You will be responsible for minifying the final bundle yourself.
|
||||
|
||||
CommonJS and ES Module builds also preserve raw checks for `process.env.NODE_ENV` to determine the mode they should run in. You should use appropriate bundler configurations to replace these environment variables in order to control which mode Vue will run in. Replacing `process.env.NODE_ENV` with string literals also allows minifiers like UglifyJS to completely drop the development-only code blocks, reducing final file size.
|
||||
|
||||
#### Webpack
|
||||
|
||||
Use Webpack's [DefinePlugin](https://webpack.js.org/plugins/define-plugin/):
|
||||
|
||||
``` js
|
||||
var webpack = require('webpack')
|
||||
|
||||
module.exports = {
|
||||
// ...
|
||||
plugins: [
|
||||
// ...
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: JSON.stringify('production')
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### Rollup
|
||||
|
||||
Use [rollup-plugin-replace](https://github.com/rollup/rollup-plugin-replace):
|
||||
|
||||
``` js
|
||||
const replace = require('rollup-plugin-replace')
|
||||
|
||||
rollup({
|
||||
// ...
|
||||
plugins: [
|
||||
replace({
|
||||
'process.env.NODE_ENV': JSON.stringify('production')
|
||||
})
|
||||
]
|
||||
}).then(...)
|
||||
```
|
||||
|
||||
#### Browserify
|
||||
|
||||
Apply a global [envify](https://github.com/hughsk/envify) transform to your bundle.
|
||||
|
||||
``` bash
|
||||
NODE_ENV=production browserify -g envify -e main.js | uglifyjs -c -m > build.js
|
||||
```
|
||||
+10960
File diff suppressed because it is too large.
Load diff
+10733
File diff suppressed because it is too large.
Load diff
+10958
File diff suppressed because it is too large.
Load diff
+10947
File diff suppressed because it is too large.
Load diff
+6
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Vue.js v2.5.17
|
||||
* (c) 2014-2018 Evan You
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";var y=Object.freeze({});function M(e){return null==e}function D(e){return null!=e}function S(e){return!0===e}function T(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function P(e){return null!==e&&"object"==typeof e}var r=Object.prototype.toString;function l(e){return"[object Object]"===r.call(e)}function i(e){var t=parseFloat(String(e));return 0<=t&&Math.floor(t)===t&&isFinite(e)}function t(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function F(e){var t=parseFloat(e);return isNaN(t)?e:t}function s(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var c=s("slot,component",!0),u=s("key,ref,slot,slot-scope,is");function f(e,t){if(e.length){var n=e.indexOf(t);if(-1<n)return e.splice(n,1)}}var n=Object.prototype.hasOwnProperty;function p(e,t){return n.call(e,t)}function e(t){var n=Object.create(null);return function(e){return n[e]||(n[e]=t(e))}}var o=/-(\w)/g,g=e(function(e){return e.replace(o,function(e,t){return t?t.toUpperCase():""})}),d=e(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),a=/\B([A-Z])/g,_=e(function(e){return e.replace(a,"-$1").toLowerCase()});var v=Function.prototype.bind?function(e,t){return e.bind(t)}:function(n,r){function e(e){var t=arguments.length;return t?1<t?n.apply(r,arguments):n.call(r,e):n.call(r)}return e._length=n.length,e};function h(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function m(e,t){for(var n in t)e[n]=t[n];return e}function b(e){for(var t={},n=0;n<e.length;n++)e[n]&&m(t,e[n]);return t}function $(e,t,n){}var O=function(e,t,n){return!1},w=function(e){return e};function C(t,n){if(t===n)return!0;var e=P(t),r=P(n);if(!e||!r)return!e&&!r&&String(t)===String(n);try{var i=Array.isArray(t),o=Array.isArray(n);if(i&&o)return t.length===n.length&&t.every(function(e,t){return C(e,n[t])});if(i||o)return!1;var a=Object.keys(t),s=Object.keys(n);return a.length===s.length&&a.every(function(e){return C(t[e],n[e])})}catch(e){return!1}}function x(e,t){for(var n=0;n<e.length;n++)if(C(e[n],t))return n;return-1}function R(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var E="data-server-rendered",k=["component","directive","filter"],A=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],j={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:O,isReservedAttr:O,isUnknownElement:O,getTagNamespace:$,parsePlatformTagName:w,mustUseProp:O,_lifecycleHooks:A};function N(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var L=/[^\w.$]/;var I,H="__proto__"in{},B="undefined"!=typeof window,U="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,V=U&&WXEnvironment.platform.toLowerCase(),z=B&&window.navigator.userAgent.toLowerCase(),K=z&&/msie|trident/.test(z),J=z&&0<z.indexOf("msie 9.0"),q=z&&0<z.indexOf("edge/"),W=(z&&z.indexOf("android"),z&&/iphone|ipad|ipod|ios/.test(z)||"ios"===V),G=(z&&/chrome\/\d+/.test(z),{}.watch),Z=!1;if(B)try{var X={};Object.defineProperty(X,"passive",{get:function(){Z=!0}}),window.addEventListener("test-passive",null,X)}catch(e){}var Y=function(){return void 0===I&&(I=!B&&!U&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),I},Q=B&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ee(e){return"function"==typeof e&&/native code/.test(e.toString())}var te,ne="undefined"!=typeof Symbol&&ee(Symbol)&&"undefined"!=typeof Reflect&&ee(Reflect.ownKeys);te="undefined"!=typeof Set&&ee(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var re=$,ie=0,oe=function(){this.id=ie++,this.subs=[]};oe.prototype.addSub=function(e){this.subs.push(e)},oe.prototype.removeSub=function(e){f(this.subs,e)},oe.prototype.depend=function(){oe.target&&oe.target.addDep(this)},oe.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},oe.target=null;var ae=[];function se(e){oe.target&&ae.push(oe.target),oe.target=e}function ce(){oe.target=ae.pop()}var le=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,tLine truncated
|
||||
+8034
File diff suppressed because it is too large.
Load diff
+8032
File diff suppressed because it is too large.
Load diff
+8021
File diff suppressed because it is too large.
Load diff
+6
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Vue.js v2.5.17
|
||||
* (c) 2014-2018 Evan You
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Vue=e()}(this,function(){"use strict";var y=Object.freeze({});function L(t){return null==t}function N(t){return null!=t}function S(t){return!0===t}function E(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function M(t){return null!==t&&"object"==typeof t}var r=Object.prototype.toString;function u(t){return"[object Object]"===r.call(t)}function o(t){var e=parseFloat(String(t));return 0<=e&&Math.floor(e)===e&&isFinite(t)}function e(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function F(t){var e=parseFloat(t);return isNaN(e)?t:e}function s(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}s("slot,component",!0);var c=s("key,ref,slot,slot-scope,is");function l(t,e){if(t.length){var n=t.indexOf(e);if(-1<n)return t.splice(n,1)}}var n=Object.prototype.hasOwnProperty;function f(t,e){return n.call(t,e)}function t(e){var n=Object.create(null);return function(t){return n[t]||(n[t]=e(t))}}var i=/-(\w)/g,p=t(function(t){return t.replace(i,function(t,e){return e?e.toUpperCase():""})}),d=t(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),a=/\B([A-Z])/g,g=t(function(t){return t.replace(a,"-$1").toLowerCase()});var v=Function.prototype.bind?function(t,e){return t.bind(e)}:function(n,r){function t(t){var e=arguments.length;return e?1<e?n.apply(r,arguments):n.call(r,t):n.call(r)}return t._length=n.length,t};function h(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function m(t,e){for(var n in e)t[n]=e[n];return t}function _(t){for(var e={},n=0;n<t.length;n++)t[n]&&m(e,t[n]);return e}function b(t,e,n){}var C=function(t,e,n){return!1},w=function(t){return t};function A(e,n){if(e===n)return!0;var t=M(e),r=M(n);if(!t||!r)return!t&&!r&&String(e)===String(n);try{var o=Array.isArray(e),i=Array.isArray(n);if(o&&i)return e.length===n.length&&e.every(function(t,e){return A(t,n[e])});if(o||i)return!1;var a=Object.keys(e),s=Object.keys(n);return a.length===s.length&&a.every(function(t){return A(e[t],n[t])})}catch(t){return!1}}function $(t,e){for(var n=0;n<t.length;n++)if(A(t[n],e))return n;return-1}function R(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}var j="data-server-rendered",x=["component","directive","filter"],O=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],k={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:C,isReservedAttr:C,isUnknownElement:C,getTagNamespace:b,parsePlatformTagName:w,mustUseProp:C,_lifecycleHooks:O};function I(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var T=/[^\w.$]/;var D,P="__proto__"in{},U="undefined"!=typeof window,V="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,B=V&&WXEnvironment.platform.toLowerCase(),H=U&&window.navigator.userAgent.toLowerCase(),z=H&&/msie|trident/.test(H),W=H&&0<H.indexOf("msie 9.0"),q=H&&0<H.indexOf("edge/"),K=(H&&H.indexOf("android"),H&&/iphone|ipad|ipod|ios/.test(H)||"ios"===B),X=(H&&/chrome\/\d+/.test(H),{}.watch),G=!1;if(U)try{var J={};Object.defineProperty(J,"passive",{get:function(){G=!0}}),window.addEventListener("test-passive",null,J)}catch(t){}var Z=function(){return void 0===D&&(D=!U&&!V&&"undefined"!=typeof global&&"server"===global.process.env.VUE_ENV),D},Q=U&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function Y(t){return"function"==typeof t&&/native code/.test(t.toString())}var tt,et="undefined"!=typeof Symbol&&Y(Symbol)&&"undefined"!=typeof Reflect&&Y(Reflect.ownKeys);tt="undefined"!=typeof Set&&Y(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var nt=b,rt=0,ot=function(){this.id=rt++,this.subs=[]};ot.prototype.addSub=function(t){this.subs.push(t)},ot.prototype.removeSub=function(t){l(this.subs,t)},ot.prototype.depend=function(){ot.target&&ot.target.addDep(this)},ot.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e<n;e++)t[e].update()},ot.target=null;var it=[];function at(t){ot.target&&it.push(ot.target),ot.target=t}function st(){ot.target=it.pop()}var ct=function(t,e,n,r,o,i,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isLine truncated
|
||||
Reference in new issue
Block a user