├── static └── .gitkeep ├── .eslintignore ├── test ├── unit │ ├── setup.js │ ├── .eslintrc │ ├── specs │ │ └── HelloWorld.spec.js │ └── jest.conf.js └── e2e │ ├── specs │ └── test.js │ ├── custom-assertions │ └── elementCount.js │ ├── nightwatch.conf.js │ └── runner.js ├── config ├── prod.env.js ├── test.env.js ├── dev.env.js └── index.js ├── src ├── assets │ └── logo.png ├── router │ └── index.js ├── main.js ├── App.vue └── components │ └── HelloWorld.vue ├── .editorconfig ├── .postcssrc.js ├── .gitignore ├── index.html ├── dist ├── static │ ├── css │ │ ├── app.cca059254702f9ed953b7df749673cf4.css │ │ └── app.cca059254702f9ed953b7df749673cf4.css.map │ └── js │ │ ├── manifest.3ad1d5771e9b13dbdad2.js │ │ ├── manifest.3ad1d5771e9b13dbdad2.js.map │ │ ├── app.f16ac5c624284d30f5af.js │ │ ├── app.f16ac5c624284d30f5af.js.map │ │ └── vendor.7fed9fa7b7ba482410b7.js └── index.html ├── .babelrc ├── .babelrc.md ├── .eslintrc.js ├── package.json ├── package.json.md └── README.md /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruochuan12/analyse-vue-cli/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | # /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | # Editor directories and files 12 | .idea 13 | .vscode 14 | *.suo 15 | *.ntvs* 16 | *.njsproj 17 | *.sln 18 | User Data/ 19 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | analyse-vue-cli 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import HelloWorld from '@/components/HelloWorld' 4 | 5 | Vue.use(Router) 6 | 7 | export default new Router({ 8 | routes: [ 9 | { 10 | path: '/', 11 | name: 'HelloWorld', 12 | component: HelloWorld 13 | } 14 | ] 15 | }) 16 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | 7 | Vue.config.productionTip = false 8 | 9 | /* eslint-disable no-new */ 10 | new Vue({ 11 | el: '#app', 12 | router, 13 | components: { App }, 14 | template: '' 15 | }) 16 | -------------------------------------------------------------------------------- /test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /dist/static/css/app.cca059254702f9ed953b7df749673cf4.css: -------------------------------------------------------------------------------- 1 | #app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px}h1[data-v-694cd902],h2[data-v-694cd902]{font-weight:400}ul[data-v-694cd902]{list-style-type:none;padding:0}li[data-v-694cd902]{display:inline-block;margin:0 10px}a[data-v-694cd902]{color:#42b983} 2 | /*# sourceMappingURL=app.cca059254702f9ed953b7df749673cf4.css.map */ -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 24 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | analyse-vue-cli
-------------------------------------------------------------------------------- /test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.babelrc.md: -------------------------------------------------------------------------------- 1 | ``` 2 | { 3 | // presets指明转码的规则 4 | "presets": [ 5 | // env项是借助插件babel-preset-env,下面这个配置说的是babel对es6,es7,es8进行转码,并且设置amd,commonjs这样的模块化文件,不进行转码 6 | ["env", { 7 | "modules": false, 8 | "targets": { 9 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 10 | } 11 | }], 12 | "stage-2" 13 | ], 14 | // plugins 属性告诉 Babel 要使用哪些插件,插件可以控制如何转换代码。 15 | // transform-vue-jsx 表明可以在项目中使用jsx语法,会使用这个插件转换 16 | "plugins": ["transform-vue-jsx", "transform-runtime"], 17 | // 在特定的环境中所执行的转码规则,当环境变量是下面的test就会覆盖上面的设置 18 | "env": { 19 | // test 是提前设置的环境变量,如果没有设置BABEL_ENV则使用NODE_ENV,如果都没有设置默认就是development 20 | "test": { 21 | "presets": ["env", "stage-2"], 22 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 23 | } 24 | } 25 | } 26 | ``` 27 | -------------------------------------------------------------------------------- /dist/static/css/app.cca059254702f9ed953b7df749673cf4.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["app.cca059254702f9ed953b7df749673cf4.css"],"names":[],"mappings":"AACA,KACE,8CAAoD,AACpD,mCAAoC,AACpC,kCAAmC,AACnC,kBAAmB,AACnB,cAAe,AACf,eAAiB,CAClB,AAED,wCACE,eAAoB,CACrB,AACD,oBACE,qBAAsB,AACtB,SAAW,CACZ,AACD,oBACE,qBAAsB,AACtB,aAAe,CAChB,AACD,mBACE,aAAe,CAChB","file":"app.cca059254702f9ed953b7df749673cf4.css","sourcesContent":["\n#app {\n font-family: 'Avenir', Helvetica, Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n text-align: center;\n color: #2c3e50;\n margin-top: 60px;\n}\n\nh1[data-v-694cd902], h2[data-v-694cd902] {\n font-weight: normal;\n}\nul[data-v-694cd902] {\n list-style-type: none;\n padding: 0;\n}\nli[data-v-694cd902] {\n display: inline-block;\n margin: 0 10px;\n}\na[data-v-694cd902] {\n color: #42b983;\n}\n"]} -------------------------------------------------------------------------------- /test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /dist/static/js/manifest.3ad1d5771e9b13dbdad2.js: -------------------------------------------------------------------------------- 1 | !function(r){var n=window.webpackJsonp;window.webpackJsonp=function(e,u,c){for(var f,i,p,a=0,l=[];a has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // https://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | // 用什么插件解析 6 | parserOptions: { 7 | parser: 'babel-eslint' 8 | }, 9 | env: { 10 | // 浏览器环境 11 | browser: true, 12 | }, 13 | // 继承 14 | extends: [ 15 | // https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention 16 | // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. 17 | 'plugin:vue/essential', 18 | // https://github.com/standard/standard/blob/master/docs/RULES-en.md 19 | 'standard' 20 | ], 21 | // required to lint *.vue files 22 | plugins: [ 23 | // eslint-plugin-vue 插件,使eslint对Vue文件生效 24 | 'vue' 25 | ], 26 | // add your custom rules here 27 | // 自定义一些规则 28 | rules: { 29 | // allow async-await 30 | 'generator-star-spacing': 'off', 31 | // allow debugger during development 32 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /test/e2e/nightwatch.conf.js: -------------------------------------------------------------------------------- 1 | require('babel-register') 2 | var config = require('../../config') 3 | 4 | // http://nightwatchjs.org/gettingstarted#settings-file 5 | module.exports = { 6 | src_folders: ['test/e2e/specs'], 7 | output_folder: 'test/e2e/reports', 8 | custom_assertions_path: ['test/e2e/custom-assertions'], 9 | 10 | selenium: { 11 | start_process: true, 12 | server_path: require('selenium-server').path, 13 | host: '127.0.0.1', 14 | port: 4444, 15 | cli_args: { 16 | 'webdriver.chrome.driver': require('chromedriver').path 17 | } 18 | }, 19 | 20 | test_settings: { 21 | default: { 22 | selenium_port: 4444, 23 | selenium_host: 'localhost', 24 | silent: true, 25 | globals: { 26 | devServerURL: 'http://localhost:' + (process.env.PORT || config.dev.port) 27 | } 28 | }, 29 | 30 | chrome: { 31 | desiredCapabilities: { 32 | browserName: 'chrome', 33 | javascriptEnabled: true, 34 | acceptSslCerts: true 35 | } 36 | }, 37 | 38 | firefox: { 39 | desiredCapabilities: { 40 | browserName: 'firefox', 41 | javascriptEnabled: true, 42 | acceptSslCerts: true 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /test/e2e/runner.js: -------------------------------------------------------------------------------- 1 | // 1. start the dev server using production config 2 | process.env.NODE_ENV = 'testing' 3 | 4 | const webpack = require('webpack') 5 | const DevServer = require('webpack-dev-server') 6 | 7 | const webpackConfig = require('../../build/webpack.prod.conf') 8 | const devConfigPromise = require('../../build/webpack.dev.conf') 9 | 10 | let server 11 | 12 | devConfigPromise.then(devConfig => { 13 | const devServerOptions = devConfig.devServer 14 | const compiler = webpack(webpackConfig) 15 | server = new DevServer(compiler, devServerOptions) 16 | const port = devServerOptions.port 17 | const host = devServerOptions.host 18 | return server.listen(port, host) 19 | }) 20 | .then(() => { 21 | // 2. run the nightwatch test suite against it 22 | // to run in additional browsers: 23 | // 1. add an entry in test/e2e/nightwatch.conf.js under "test_settings" 24 | // 2. add it to the --env flag below 25 | // or override the environment flag, for example: `npm run e2e -- --env chrome,firefox` 26 | // For more information on Nightwatch's config file, see 27 | // http://nightwatchjs.org/guide#settings-file 28 | let opts = process.argv.slice(2) 29 | if (opts.indexOf('--config') === -1) { 30 | opts = opts.concat(['--config', 'test/e2e/nightwatch.conf.js']) 31 | } 32 | if (opts.indexOf('--env') === -1) { 33 | opts = opts.concat(['--env', 'chrome']) 34 | } 35 | 36 | const spawn = require('cross-spawn') 37 | const runner = spawn('./node_modules/.bin/nightwatch', opts, { stdio: 'inherit' }) 38 | 39 | runner.on('exit', function (code) { 40 | server.close() 41 | process.exit(code) 42 | }) 43 | 44 | runner.on('error', function (err) { 45 | server.close() 46 | throw err 47 | }) 48 | }) 49 | -------------------------------------------------------------------------------- /src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 85 | 86 | 96 | 97 | 98 | 114 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.3.1 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: {}, 14 | 15 | // Various Dev Server settings 16 | host: 'localhost', // can be overwritten by process.env.HOST 17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: false, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | // Use Eslint Loader? 24 | // If true, your code will be linted during bundling and 25 | // linting errors and warnings will be shown in the console. 26 | useEslint: true, 27 | // If true, eslint errors and warnings will also be shown in the error overlay 28 | // in the browser. 29 | showEslintErrorsInOverlay: false, 30 | 31 | /** 32 | * Source Maps 33 | */ 34 | 35 | // https://webpack.js.org/configuration/devtool/#development 36 | devtool: 'cheap-module-eval-source-map', 37 | 38 | // If you have problems debugging vue-files in devtools, 39 | // set this to false - it *may* help 40 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 41 | cacheBusting: true, 42 | 43 | cssSourceMap: true 44 | }, 45 | 46 | build: { 47 | // Template for index.html 48 | index: path.resolve(__dirname, '../dist/index.html'), 49 | 50 | // Paths 51 | assetsRoot: path.resolve(__dirname, '../dist'), 52 | assetsSubDirectory: 'static', 53 | assetsPublicPath: './', 54 | 55 | /** 56 | * Source Maps 57 | */ 58 | 59 | productionSourceMap: true, 60 | // https://webpack.js.org/configuration/devtool/#production 61 | devtool: '#source-map', 62 | 63 | // Gzip off by default as many popular static hosts such as 64 | // Surge or Netlify already gzip all static assets for you. 65 | // Before setting to `true`, make sure to: 66 | // npm install --save-dev compression-webpack-plugin 67 | productionGzip: false, 68 | productionGzipExtensions: ['js', 'css'], 69 | 70 | // Run the build command with an extra argument to 71 | // View the bundle analyzer report after build finishes: 72 | // `npm run build --report` 73 | // Set to `true` or `false` to always turn it on or off 74 | bundleAnalyzerReport: process.env.npm_config_report 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "analyse-vue-cli", 3 | "version": "1.0.0", 4 | "description": "analyse-vue-cli", 5 | "author": "若川 ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "unit": "jest --config test/unit/jest.conf.js --coverage", 11 | "e2e": "node test/e2e/runner.js", 12 | "test": "npm run unit && npm run e2e", 13 | "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs", 14 | "build": "node build/build.js" 15 | }, 16 | "dependencies": { 17 | "vue": "^2.5.2", 18 | "vue-router": "^3.0.1" 19 | }, 20 | "devDependencies": { 21 | "autoprefixer": "^7.1.2", 22 | "babel-core": "^6.22.1", 23 | "babel-eslint": "^8.2.1", 24 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 25 | "babel-jest": "^21.0.2", 26 | "babel-loader": "^7.1.1", 27 | "babel-plugin-dynamic-import-node": "^1.2.0", 28 | "babel-plugin-syntax-jsx": "^6.18.0", 29 | "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", 30 | "babel-plugin-transform-runtime": "^6.22.0", 31 | "babel-plugin-transform-vue-jsx": "^3.5.0", 32 | "babel-preset-env": "^1.3.2", 33 | "babel-preset-stage-2": "^6.22.0", 34 | "babel-register": "^6.22.0", 35 | "chalk": "^2.0.1", 36 | "chromedriver": "^2.27.2", 37 | "copy-webpack-plugin": "^4.0.1", 38 | "cross-spawn": "^5.0.1", 39 | "css-loader": "^0.28.0", 40 | "eslint": "^4.15.0", 41 | "eslint-config-standard": "^10.2.1", 42 | "eslint-friendly-formatter": "^3.0.0", 43 | "eslint-loader": "^1.7.1", 44 | "eslint-plugin-import": "^2.7.0", 45 | "eslint-plugin-node": "^5.2.0", 46 | "eslint-plugin-promise": "^3.4.0", 47 | "eslint-plugin-standard": "^3.0.1", 48 | "eslint-plugin-vue": "^4.0.0", 49 | "extract-text-webpack-plugin": "^3.0.0", 50 | "file-loader": "^1.1.4", 51 | "friendly-errors-webpack-plugin": "^1.6.1", 52 | "html-webpack-plugin": "^2.30.1", 53 | "jest": "^22.0.4", 54 | "jest-serializer-vue": "^0.3.0", 55 | "nightwatch": "^0.9.12", 56 | "node-notifier": "^5.1.2", 57 | "optimize-css-assets-webpack-plugin": "^3.2.0", 58 | "ora": "^1.2.0", 59 | "portfinder": "^1.0.13", 60 | "postcss-import": "^11.0.0", 61 | "postcss-loader": "^2.0.8", 62 | "postcss-url": "^7.2.1", 63 | "rimraf": "^2.6.0", 64 | "selenium-server": "^3.0.1", 65 | "semver": "^5.3.0", 66 | "shelljs": "^0.7.6", 67 | "uglifyjs-webpack-plugin": "^1.1.1", 68 | "url-loader": "^0.5.8", 69 | "vue-jest": "^1.0.2", 70 | "vue-loader": "^13.3.0", 71 | "vue-style-loader": "^3.0.1", 72 | "vue-template-compiler": "^2.5.2", 73 | "webpack": "^3.6.0", 74 | "webpack-bundle-analyzer": "^2.9.0", 75 | "webpack-dev-server": "^2.9.1", 76 | "webpack-merge": "^4.1.0" 77 | }, 78 | "engines": { 79 | "node": ">= 6.0.0", 80 | "npm": ">= 3.0.0" 81 | }, 82 | "browserslist": [ 83 | "> 1%", 84 | "last 2 versions", 85 | "not ie <= 8" 86 | ] 87 | } 88 | -------------------------------------------------------------------------------- /package.json.md: -------------------------------------------------------------------------------- 1 | ``` 2 | { 3 | "name": "analyse-vue-cli", 4 | "version": "1.0.0", 5 | "description": "analyse-vue-cli", 6 | "author": "若川 ", 7 | "private": true, 8 | // Npm Script 底层实现原理是通过调用 Shell 去运行脚本命令 9 | "scripts": { 10 | // dev webpack-dev-server --config 指定配置文件 11 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 12 | // npm run start等同于运行npm run dev 13 | "start": "npm run dev", 14 | // jest测试 15 | "unit": "jest --config test/unit/jest.conf.js --coverage", 16 | // e2e测试 17 | "e2e": "node test/e2e/runner.js", 18 | // 运行jest测试和e2e测试 19 | "test": "npm run unit && npm run e2e", 20 | // eslint --ext 指定扩展名和相应的文件 21 | "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs", 22 | // node 执行build/build.js文件 23 | "build": "node build/build.js" 24 | }, 25 | // 生产环境依赖 26 | "dependencies": { 27 | "vue": "^2.5.2", 28 | "vue-router": "^3.0.1" 29 | }, 30 | // 开发环境依赖 31 | "devDependencies": { 32 | "autoprefixer": "^7.1.2", 33 | "babel-core": "^6.22.1", 34 | "babel-eslint": "^8.2.1", 35 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 36 | "babel-jest": "^21.0.2", 37 | "babel-loader": "^7.1.1", 38 | "babel-plugin-dynamic-import-node": "^1.2.0", 39 | "babel-plugin-syntax-jsx": "^6.18.0", 40 | "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", 41 | "babel-plugin-transform-runtime": "^6.22.0", 42 | "babel-plugin-transform-vue-jsx": "^3.5.0", 43 | "babel-preset-env": "^1.3.2", 44 | "babel-preset-stage-2": "^6.22.0", 45 | "babel-register": "^6.22.0", 46 | "chalk": "^2.0.1", 47 | "chromedriver": "^2.27.2", 48 | "copy-webpack-plugin": "^4.0.1", 49 | "cross-spawn": "^5.0.1", 50 | "css-loader": "^0.28.0", 51 | "eslint": "^4.15.0", 52 | "eslint-config-standard": "^10.2.1", 53 | "eslint-friendly-formatter": "^3.0.0", 54 | "eslint-loader": "^1.7.1", 55 | "eslint-plugin-import": "^2.7.0", 56 | "eslint-plugin-node": "^5.2.0", 57 | "eslint-plugin-promise": "^3.4.0", 58 | "eslint-plugin-standard": "^3.0.1", 59 | "eslint-plugin-vue": "^4.0.0", 60 | "extract-text-webpack-plugin": "^3.0.0", 61 | "file-loader": "^1.1.4", 62 | "friendly-errors-webpack-plugin": "^1.6.1", 63 | "html-webpack-plugin": "^2.30.1", 64 | "jest": "^22.0.4", 65 | "jest-serializer-vue": "^0.3.0", 66 | "nightwatch": "^0.9.12", 67 | // 系统通知的提示 68 | "node-notifier": "^5.1.2", 69 | "optimize-css-assets-webpack-plugin": "^3.2.0", 70 | "ora": "^1.2.0", 71 | "portfinder": "^1.0.13", 72 | "postcss-import": "^11.0.0", 73 | "postcss-loader": "^2.0.8", 74 | "postcss-url": "^7.2.1", 75 | // 删除文件和文件夹 76 | "rimraf": "^2.6.0", 77 | "selenium-server": "^3.0.1", 78 | "semver": "^5.3.0", 79 | "shelljs": "^0.7.6", 80 | "uglifyjs-webpack-plugin": "^1.1.1", 81 | "url-loader": "^0.5.8", 82 | "vue-jest": "^1.0.2", 83 | // 处理vue单文件的loader 中文文档:https://vue-loader-v14.vuejs.org/zh-cn/ 84 | "vue-loader": "^13.3.0", 85 | // Vue单文件中的样式解析loader,类似于style-loader,使用vue-style-loader可以热更新,style-loader不能。 86 | "vue-style-loader": "^3.0.1", 87 | // 把 vue-loader 提取出的 HTML 模版编译成对应的可执行的 JavaScript 代码,这和 React 中的 JSX 语法被编译成 JavaScript 代码类似。预先编译好 HTML 模版相对于在浏览器中再去编译 HTML 模版的好处在于性能更好。 88 | "vue-template-compiler": "^2.5.2", 89 | "webpack": "^3.6.0", 90 | // 构建分析的插件 91 | "webpack-bundle-analyzer": "^2.9.0", 92 | "webpack-dev-server": "^2.9.1", 93 | "webpack-merge": "^4.1.0" 94 | }, 95 | // 指定版本 96 | "engines": { 97 | "node": ">= 6.0.0", 98 | "npm": ">= 3.0.0" 99 | }, 100 | // 浏览器列表 101 | "browserslist": [ 102 | // 全球有超过1%的人使用的浏览器 103 | "> 1%", 104 | // 根据 http://caniuse.com 追踪的最后两个版本的所有浏览器 105 | "last 2 versions", 106 | // 不是IE8、IE7等浏览器 107 | "not ie <= 8" 108 | ] 109 | } 110 | ``` 111 | -------------------------------------------------------------------------------- /dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap a212071b193b5ede1cf4"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap a212071b193b5ede1cf4"],"sourceRoot":""} -------------------------------------------------------------------------------- /dist/static/js/app.f16ac5c624284d30f5af.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([1],{"/tSm":function(t,e){},"7Otq":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTk2QkI4RkE3NjE2MTFFNUE4NEU4RkIxNjQ5MTYyRDgiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTk2QkI4R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QaEEqQsOst2WY/9vs/egUILUtZIN59Dv4ZyTWwmSEyDnUx7luRtJar4qJUjT4RdsL+bI3xetzwolSMOwTn1Vgihmx2tsD+XAz4esrwolSMPxLZK9XGPS+qhQgmSCo2xbBPu3xfqoUIJkhh+yvSPQr3esbwolSOYYUp+UIIrZ8SzbM4L8ecb6pFCC6BNbWw8lSB7wLtt2AX5st74olCDikPWskfRZNSVIi2OKst2+c5P1QaEEEYuH2V7N4Lqv2msrlCDisa5FrqkEUSwIL7E93sDrPW6vqVCC5AaN0l/kVZ+iBGlxfMR2awOuc6u9lkIJkjvcwXagjuc/YK+hUILkEgnVdxeRDfYaCiVIbvEk2546nHePPbdCCZJ7rMvJORVKkEzwBtuOGp5vhz2nQgnSNMBu6uM1OM84Nedu80qQFscY1SYfx2Z7LoUSpOlwH9ubi/j9m/YcCiWIDth1YK4EaUU8z7Z7Ab/bbX+rUII0PdY36DcKJUgu8R7btnkcv83+RqEEaRncwnZkDscdsccqlCAthQrbDXM47gZ7rEIJ0nJ4lO2VE3z/ij1GoQRpWaxb4HcKJUhL4GW2XTN8vst+p1CCtDw+Oc6Y6/hEoQRpCRxm23rcv7fazxRKEIXFXZRuwBDZvxUC4GsIREHflguDkyQqaVYotIulUChBFAoliEKhBFEolCAKhRJEoVCCKBRKEIVCCaJQKJQgCoUSRKFQgigUShCFIhP8vwADACog5YM65zugAAAAAElFTkSuQmCC"},NHnr:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("7+uW"),s={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("img",{attrs:{src:n("7Otq")}}),this._v(" "),e("router-view")],1)},staticRenderFns:[]};var i=n("VU/8")({name:"App"},s,!1,function(t){n("/tSm")},null,null).exports,r=n("/ocq"),l={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"hello"},[n("h1",[t._v(t._s(t.msg))]),t._v(" "),n("h2",[t._v("Essential Links")]),t._v(" "),t._m(0),t._v(" "),n("h2",[t._v("Ecosystem")]),t._v(" "),t._m(1)])},staticRenderFns:[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",[n("li",[n("a",{attrs:{href:"https://vuejs.org",target:"_blank"}},[t._v("\n Core Docs\n ")])]),t._v(" "),n("li",[n("a",{attrs:{href:"https://forum.vuejs.org",target:"_blank"}},[t._v("\n Forum\n ")])]),t._v(" "),n("li",[n("a",{attrs:{href:"https://chat.vuejs.org",target:"_blank"}},[t._v("\n Community Chat\n ")])]),t._v(" "),n("li",[n("a",{attrs:{href:"https://twitter.com/vuejs",target:"_blank"}},[t._v("\n Twitter\n ")])]),t._v(" "),n("br"),t._v(" "),n("li",[n("a",{attrs:{href:"http://vuejs-templates.github.io/webpack/",target:"_blank"}},[t._v("\n Docs for This Template\n ")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("a",{attrs:{href:"http://router.vuejs.org/",target:"_blank"}},[this._v("\n vue-router\n ")])]),this._v(" "),e("li",[e("a",{attrs:{href:"http://vuex.vuejs.org/",target:"_blank"}},[this._v("\n vuex\n ")])]),this._v(" "),e("li",[e("a",{attrs:{href:"http://vue-loader.vuejs.org/",target:"_blank"}},[this._v("\n vue-loader\n ")])]),this._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/vuejs/awesome-vue",target:"_blank"}},[this._v("\n awesome-vue\n ")])])])}]};var c=n("VU/8")({name:"HelloWorld",data:function(){return{msg:"Welcome to Your Vue.js App"}}},l,!1,function(t){n("Ugm9")},"data-v-694cd902",null).exports;a.a.use(r.a);var h=new r.a({routes:[{path:"/",name:"HelloWorld",component:c}]});a.a.config.productionTip=!1,new a.a({el:"#app",router:h,components:{App:i},template:""})},Ugm9:function(t,e){}},["NHnr"]); 2 | //# sourceMappingURL=app.f16ac5c624284d30f5af.js.map -------------------------------------------------------------------------------- /dist/static/js/app.f16ac5c624284d30f5af.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./src/assets/logo.png","webpack:///./src/App.vue?3024","webpack:///./src/App.vue","webpack:///src/App.vue","webpack:///./src/components/HelloWorld.vue?9f66","webpack:///./src/components/HelloWorld.vue","webpack:///src/components/HelloWorld.vue","webpack:///./src/router/index.js","webpack:///./src/main.js"],"names":["module","exports","selectortype_template_index_0_src_App","render","_h","this","$createElement","_c","_self","attrs","id","src","__webpack_require__","_v","staticRenderFns","src_App","normalizeComponent","name","ssrContext","components_HelloWorld","_vm","staticClass","_s","msg","_m","href","target","src_components_HelloWorld","HelloWorld_normalizeComponent","data","vue_esm","use","vue_router_esm","router","routes","path","component","config","productionTip","el","components","App","template"],"mappings":"8DAAAA,EAAAC,QAAA,yiSCGAC,GADiBC,OAFjB,WAA0B,IAAaC,EAAbC,KAAaC,eAA0BC,EAAvCF,KAAuCG,MAAAD,IAAAH,EAAwB,OAAAG,EAAA,OAAiBE,OAAOC,GAAA,SAAYH,EAAA,OAAYE,OAAOE,IAAAC,EAAA,WAAtHP,KAA0JQ,GAAA,KAAAN,EAAA,oBAEnKO,oBCCjB,IAuBAC,EAvBAH,EAAA,OAcAI,ECRAC,KAAA,ODUAf,GATA,EAVA,SAAAgB,GACAN,EAAA,SAaA,KAEA,MAUA,oBEvBAO,GADiBhB,OAFjB,WAA0B,IAAAiB,EAAAf,KAAaD,EAAAgB,EAAAd,eAA0BC,EAAAa,EAAAZ,MAAAD,IAAAH,EAAwB,OAAAG,EAAA,OAAiBc,YAAA,UAAoBd,EAAA,MAAAa,EAAAP,GAAAO,EAAAE,GAAAF,EAAAG,QAAAH,EAAAP,GAAA,KAAAN,EAAA,MAAAa,EAAAP,GAAA,qBAAAO,EAAAP,GAAA,KAAAO,EAAAI,GAAA,GAAAJ,EAAAP,GAAA,KAAAN,EAAA,MAAAa,EAAAP,GAAA,eAAAO,EAAAP,GAAA,KAAAO,EAAAI,GAAA,MAE7GV,iBADjB,WAAoC,IAAAM,EAAAf,KAAaD,EAAAgB,EAAAd,eAA0BC,EAAAa,EAAAZ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2jmhGl5QWzvQaEEqQsOst2WY/9vs/egUILUtZIN59Dv4ZyTWwmSEyDnUx7luRtJar4qJUjT4RdsL+bI3xetzwolSMOwTn1Vgihmx2tsD+XAz4esrwolSMPxLZK9XGPS+qhQgmSCo2xbBPu3xfqoUIJkhh+yvSPQr3esbwolSOYYUp+UIIrZ8SzbM4L8ecb6pFCC6BNbWw8lSB7wLtt2AX5st74olCDikPWskfRZNSVIi2OKst2+c5P1QaEEEYuH2V7N4Lqv2msrlCDisa5FrqkEUSwIL7E93sDrPW6vqVCC5AaN0l/kVZ+iBGlxfMR2awOuc6u9lkIJkjvcwXagjuc/YK+hUILkEgnVdxeRDfYaCiVIbvEk2546nHePPbdCCZJ7rMvJORVKkEzwBtuOGp5vhz2nQgnSNMBu6uM1OM84Nedu80qQFscY1SYfx2Z7LoUSpOlwH9ubi/j9m/YcCiWIDth1YK4EaUU8z7Z7Ab/bbX+rUII0PdY36DcKJUgu8R7btnkcv83+RqEEaRncwnZkDscdsccqlCAthQrbDXM47gZ7rEIJ0nJ4lO2VE3z/ij1GoQRpWaxb4HcKJUhL4GW2XTN8vst+p1CCtDw+Oc6Y6/hEoQRpCRxm23rcv7fazxRKEIXFXZRuwBDZvxUC4GsIREHflguDkyQqaVYotIulUChBFAoliEKhBFEolCAKhRJEoVCCKBRKEIVCCaJQKJQgCoUSRKFQgigUShCFIhP8vwADACog5YM65zugAAAAAElFTkSuQmCC\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/logo.png\n// module id = 7Otq\n// module chunks = 1","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('img',{attrs:{\"src\":require(\"./assets/logo.png\")}}),_vm._v(\" \"),_c('router-view')],1)}\nvar staticRenderFns = []\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-4a9894ad\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/App.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-4a9894ad\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!../node_modules/vue-loader/lib/selector?type=styles&index=0!./App.vue\")\n}\nvar normalizeComponent = require(\"!../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\nimport __vue_script__ from \"!!babel-loader!../node_modules/vue-loader/lib/selector?type=script&index=0!./App.vue\"\n/* template */\nimport __vue_template__ from \"!!../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-4a9894ad\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../node_modules/vue-loader/lib/selector?type=template&index=0!./App.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/App.vue\n// module id = null\n// module chunks = ","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// src/App.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"hello\"},[_c('h1',[_vm._v(_vm._s(_vm.msg))]),_vm._v(\" \"),_c('h2',[_vm._v(\"Essential Links\")]),_vm._v(\" \"),_vm._m(0),_vm._v(\" \"),_c('h2',[_vm._v(\"Ecosystem\")]),_vm._v(\" \"),_vm._m(1)])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',[_c('li',[_c('a',{attrs:{\"href\":\"https://vuejs.org\",\"target\":\"_blank\"}},[_vm._v(\"\\n Core Docs\\n \")])]),_vm._v(\" \"),_c('li',[_c('a',{attrs:{\"href\":\"https://forum.vuejs.org\",\"target\":\"_blank\"}},[_vm._v(\"\\n Forum\\n \")])]),_vm._v(\" \"),_c('li',[_c('a',{attrs:{\"href\":\"https://chat.vuejs.org\",\"target\":\"_blank\"}},[_vm._v(\"\\n Community Chat\\n \")])]),_vm._v(\" \"),_c('li',[_c('a',{attrs:{\"href\":\"https://twitter.com/vuejs\",\"target\":\"_blank\"}},[_vm._v(\"\\n Twitter\\n \")])]),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('li',[_c('a',{attrs:{\"href\":\"http://vuejs-templates.github.io/webpack/\",\"target\":\"_blank\"}},[_vm._v(\"\\n Docs for This Template\\n \")])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',[_c('li',[_c('a',{attrs:{\"href\":\"http://router.vuejs.org/\",\"target\":\"_blank\"}},[_vm._v(\"\\n vue-router\\n \")])]),_vm._v(\" \"),_c('li',[_c('a',{attrs:{\"href\":\"http://vuex.vuejs.org/\",\"target\":\"_blank\"}},[_vm._v(\"\\n vuex\\n \")])]),_vm._v(\" \"),_c('li',[_c('a',{attrs:{\"href\":\"http://vue-loader.vuejs.org/\",\"target\":\"_blank\"}},[_vm._v(\"\\n vue-loader\\n \")])]),_vm._v(\" \"),_c('li',[_c('a',{attrs:{\"href\":\"https://github.com/vuejs/awesome-vue\",\"target\":\"_blank\"}},[_vm._v(\"\\n awesome-vue\\n \")])])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-694cd902\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/HelloWorld.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-694cd902\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./HelloWorld.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./HelloWorld.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./HelloWorld.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-694cd902\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./HelloWorld.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-694cd902\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/HelloWorld.vue\n// module id = null\n// module chunks = ","\n\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// src/components/HelloWorld.vue","import Vue from 'vue'\nimport Router from 'vue-router'\nimport HelloWorld from '@/components/HelloWorld'\n\nVue.use(Router)\n\nexport default new Router({\n routes: [\n {\n path: '/',\n name: 'HelloWorld',\n component: HelloWorld\n }\n ]\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/router/index.js","// The Vue build version to load with the `import` command\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\nimport Vue from 'vue'\nimport App from './App'\nimport router from './router'\n\nVue.config.productionTip = false\n\n/* eslint-disable no-new */\nnew Vue({\n el: '#app',\n router,\n components: { App },\n template: ''\n})\n\n\n\n// WEBPACK FOOTER //\n// ./src/main.js"],"sourceRoot":""} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 分析`vue-cli@2.9.3` 搭建的`webpack`项目工程 2 | ### 前言 3 | >已经有很多分析`Vue-cli`搭建工程的文章,为什么自己还要写一遍呢。学习就好比是座大山,人们沿着不同的路登山,分享着自己看到的风景。你不一定能看到别人看到的风景,体会到别人的心情。只有自己去登山,才能看到不一样的风景,体会才更加深刻。 4 | 5 | **项目放在笔者的`github`上,[分析vue-cli@2.9.3 搭建的webpack项目工程](https://github.com/lxchuan12/analyse-vue-cli)。方便大家克隆下载,或者在线查看。同时也求个`star` `^_^`,也是对笔者的一种鼓励和支持。** 6 | 7 | 正文从这里开始~ 8 | 9 | ### 使用`vue-cli`初始化`webpack`工程 10 | ``` 11 | // # 安装 12 | npm install -g vue-cli 13 | // 安装完后vue命令就可以使用了。实际上是全局注册了vue、vue-init、vue-list几个命令 14 | 15 | // # ubuntu 系统下 16 | // [vue-cli@2.9.3] link /usr/local/bin/vue@ -> /usr/local/lib/node_modules/vue-cli/bin/vue 17 | // [vue-cli@2.9.3] link /usr/local/bin/vue-init@ -> /usr/local/lib/node_modules/vue-cli/bin/vue-init 18 | // [vue-cli@2.9.3] link /usr/local/bin/vue-list@ -> /usr/local/lib/node_modules/vue-cli/bin/vue-list 19 | 20 | vue list 21 | // 可以发现有browserify、browserify-simple、pwa、simple、webpack、webpack-simple几种模板可选,这里选用webpack。 22 | 23 | // # 使用 vue init 24 | vue init 25 | 26 | // # 例子 27 | vue init webpack analyse-vue-cli 28 | ``` 29 | 更多`vue-cli`如何工作的可以查看这篇文章[vue-cli是如何工作的](https://juejin.im/post/5a7b1b86f265da4e8f049081),或者分析Vue-cli源码查看这篇[走进Vue-cli源码,自己动手搭建前端脚手架工具](https://segmentfault.com/a/1190000013975247),再或者直接查看[vue-cli github仓库源码](https://github.com/vuejs/vue-cli/tree/master) 30 | 31 | 如果对`webpack`还不是很了解,可以查看[webpack官方文档中的概念](https://webpack.docschina.org/concepts/),虽然是最新版本的,但概念都是差不多的。 32 | 33 | ### `package.json` 34 | 分析一个项目,一般从`package.json`的命令入口`scripts`开始。 35 | ``` 36 | "scripts": { 37 | // dev webpack-dev-server --inline 模式 --progress 显示进度 --config 指定配置文件(默认是webpack.config.js) 38 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 39 | "start": "npm run dev", 40 | // jest测试 41 | "unit": "jest --config test/unit/jest.conf.js --coverage", 42 | // e2e测试 43 | "e2e": "node test/e2e/runner.js", 44 | // 运行jest测试和e2e测试 45 | "test": "npm run unit && npm run e2e", 46 | // eslint --ext 指定扩展名和相应的文件 47 | "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs", 48 | // node 执行build/build.js文件 49 | "build": "node build/build.js" 50 | }, 51 | ``` 52 | `Npm Script` 底层实现原理是通过调用 `Shell` 去运行脚本命令。`npm run start`等同于运行`npm run dev`。 53 | 54 | `Npm Script` 还有一个重要的功能是能运行安装到项目目录里的 `node_modules` 里的可执行模块。 55 | 56 | 例如在通过命令`npm i -D webpack-dev-server`将`webpack-dev-server`安装到项目后,是无法直接在项目根目录下通过命令 `webpack-dev-server` 去执行 `webpack-dev-server` 构建的,而是要通过命令 `./node_modules/.bin/webpack-dev-server` 去执行。 57 | 58 | `Npm Script` 能方便的解决这个问题,只需要在 `scripts` 字段里定义一个任务,例如: 59 | ``` 60 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js" 61 | ``` 62 | `Npm Script` 会先去项目目录下的 `node_modules` 中寻找有没有可执行的 `webpack-dev-server` 文件,如果有就使用本地的,如果没有就使用全局的。 所以现在执行 `webpack-dev-server` 启动服务时只需要通过执行 `npm run dev` 去实现。 63 | > 再来看下 npm run dev 64 | `webpack-dev-server` 其实是一个`node.js`的应用程序,它是通过`JavaScript`开发的。在命令行执行`npm run dev`命令等同于执行`node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --progress --config build/webpack.dev.conf.js`。你可以试试。 65 | 66 | 更多`package.json`的配置项,可以查看[阮一峰老师的文章 package.json文件](http://javascript.ruanyifeng.com/nodejs/packagejson.html) 67 | 68 | `npm run dev`指定了`build/webpack.dev.conf.js`配置去启动服务,那么我们来看下这个文件做了什么。 69 | 70 | ### `build/webpack.dev.conf.js` `webpack`开发环境配置 71 | 这个文件主要做了以下几件事情:
72 | 1、引入各种依赖,同时也引入了`config`文件夹下的变量和配置,和一个工具函数`build/utils.js`,
73 | 2、合并`build/webpack.base.conf.js`配置文件,
74 | 3、配置开发环境一些`devServer`,`plugin`等配置,
75 | 4、最后导出了一个`Promise`,根据配置的端口,寻找可用的端口来启动服务。 76 | 77 | 具体可以看`build/webpack.dev.conf.js`这个文件注释: 78 | 79 | ``` 80 | 'use strict' 81 | // 引入工具函数 82 | const utils = require('./utils') 83 | // 引入webpack 84 | const webpack = require('webpack') 85 | // 引入config/index.js配置 86 | const config = require('../config') 87 | // 合并webpack配置 88 | const merge = require('webpack-merge') 89 | const path = require('path') 90 | // 基本配置 91 | const baseWebpackConfig = require('./webpack.base.conf') 92 | // 拷贝插件 93 | const CopyWebpackPlugin = require('copy-webpack-plugin') 94 | // 生成html的插件 95 | const HtmlWebpackPlugin = require('html-webpack-plugin') 96 | // 友好提示的插件 https://github.com/geowarin/friendly-errors-webpack-plugin 97 | const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 98 | // 查找可用端口 // github仓库 https://github.com/indexzero/node-portfinder 99 | const portfinder = require('portfinder') 100 | 101 | 102 | // process模块用来与当前进程互动,可以通过全局变量process访问,不必使用require命令加载。它是一个EventEmitter对象的实例。 103 | 104 | // 后面有些process模块用到的,所以这里统一列举下。 105 | // 更多查看这篇阮一峰的这篇文章 http://javascript.ruanyifeng.com/nodejs/process.html 106 | 107 | // process对象提供一系列属性,用于返回系统信息。 108 | // process.pid:当前进程的进程号。 109 | // process.version:Node的版本,比如v0.10.18。 110 | // process.platform:当前系统平台,比如Linux。 111 | // process.title:默认值为“node”,可以自定义该值。 112 | // process.argv:当前进程的命令行参数数组。 113 | // process.env:指向当前shell的环境变量,比如process.env.HOME。 114 | // process.execPath:运行当前进程的可执行文件的绝对路径。 115 | // process.stdout:指向标准输出。 116 | // process.stdin:指向标准输入。 117 | // process.stderr:指向标准错误。 118 | 119 | // process对象提供以下方法: 120 | // process.exit():退出当前进程。 121 | // process.cwd():返回运行当前脚本的工作目录的路径。_ 122 | // process.chdir():改变工作目录。 123 | // process.nextTick():将一个回调函数放在下次事件循环的顶部。 124 | 125 | // host 126 | const HOST = process.env.HOST 127 | // 端口 128 | const PORT = process.env.PORT && Number(process.env.PORT) 129 | 130 | // 合并基本的webpack配置 131 | const devWebpackConfig = merge(baseWebpackConfig, { 132 | module: { 133 | // cssSourceMap这里配置的是true 134 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true }) 135 | }, 136 | // cheap-module-eval-source-map is faster for development 137 | // 在开发环境是cheap-module-eval-source-map选项更快 138 | // 这里配置的是cheap-module-eval-source-map 139 | // 更多可以查看中文文档:https://webpack.docschina.org/configuration/devtool/#devtool 140 | // 英文 https://webpack.js.org/configuration/devtool/#development 141 | devtool: config.dev.devtool, 142 | 143 | // these devServer options should be customized in /config/index.js 144 | devServer: { 145 | // 配置在客户端的日志等级,这会影响到你在浏览器开发者工具控制台里看到的日志内容。 146 | // clientLogLevel 是枚举类型,可取如下之一的值 none | error | warning | info。 147 | // 默认为 info 级别,即输出所有类型的日志,设置成 none 可以不输出任何日志。 148 | clientLogLevel: 'warning', 149 | // historyApiFallback boolean object 用于方便的开发使用了 HTML5 History API 的单页应用。 150 | // 可以简单true 或者 任意的 404 响应可以提供为 index.html 页面。 151 | historyApiFallback: { 152 | rewrites: [ 153 | // config.dev.assetsPublicPath 这里是 / 154 | { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') }, 155 | ], 156 | }, 157 | // 开启热更新 158 | hot: true, 159 | // contentBase 配置 DevServer HTTP 服务器的文件根目录。 160 | // 默认情况下为当前执行目录,通常是项目根目录,所有一般情况下你不必设置它,除非你有额外的文件需要被 DevServer 服务。 161 | contentBase: false, // since we use CopyWebpackPlugin. 162 | // compress 配置是否启用 gzip 压缩。boolean 为类型,默认为 false。 163 | compress: true, 164 | // host 165 | // 例如你想要局域网中的其它设备访问你本地的服务,可以在启动 DevServer 时带上 --host 0.0.0.0 166 | // 或者直接设置为 0.0.0.0 167 | // 这里配置的是localhost 168 | host: HOST || config.dev.host, 169 | // 端口号 这里配置的是8080 170 | port: PORT || config.dev.port, 171 | // 打开浏览器,这里配置是不打开false 172 | open: config.dev.autoOpenBrowser, 173 | // 是否在浏览器以遮罩形式显示报错信息 这里配置的是true 174 | overlay: config.dev.errorOverlay 175 | ? { warnings: false, errors: true } 176 | : false, 177 | // 这里配置的是 / 178 | publicPath: config.dev.assetsPublicPath, 179 | // 代理 这里配置的是空{},有需要可以自行配置 180 | proxy: config.dev.proxyTable, 181 | // 启用 quiet 后,除了初始启动信息之外的任何内容都不会被打印到控制台。这也意味着来自 webpack 的错误或警告在控制台不可见。 182 | // 开启后一般非常干净只有类似的提示 Your application is running here: http://localhost:8080 183 | quiet: true, // necessary for FriendlyErrorsPlugin 184 | // webpack-dev-middleware 185 | // watch: false, 186 | // 启用 Watch 模式。这意味着在初始构建之后,webpack 将继续监听任何已解析文件的更改。Watch 模式默认关闭。 187 | // webpack-dev-server 和 webpack-dev-middleware 里 Watch 模式默认开启。 188 | // Watch 模式的选项 189 | watchOptions: { 190 | // 或者指定毫秒为单位进行轮询。 191 | // 这里配置为false 192 | poll: config.dev.poll, 193 | } 194 | // 更多查看中文文档:https://webpack.docschina.org/configuration/watch/#src/components/Sidebar/Sidebar.jsx 195 | }, 196 | plugins: [ 197 | // 定义为开发环境 198 | new webpack.DefinePlugin({ 199 | // 这里是 { NODE_ENV: '"development"' } 200 | 'process.env': require('../config/dev.env') 201 | }), 202 | // 热更新插件 203 | new webpack.HotModuleReplacementPlugin(), 204 | // 热更新时显示具体的模块路径 205 | new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update. 206 | // 在编译出现错误时,使用 NoEmitOnErrorsPlugin 来跳过输出阶段。 207 | new webpack.NoEmitOnErrorsPlugin(), 208 | // github仓库 https://github.com/ampedandwired/html-webpack-plugin 209 | new HtmlWebpackPlugin({ 210 | filename: 'index.html', 211 | template: 'index.html', 212 | // inject 默认值 true,script标签位于html文件的 body 底部 213 | // body 通true, header, script 标签位于 head 标签内 214 | // false 不插入生成的 js 文件,只是单纯的生成一个 html 文件 215 | inject: true 216 | }), 217 | // copy custom static assets 218 | // 把static资源复制到相应目录。 219 | new CopyWebpackPlugin([ 220 | { 221 | // 这里是 static 222 | from: path.resolve(__dirname, '../static'), 223 | // 这里是 static 224 | to: config.dev.assetsSubDirectory, 225 | // 忽略.开头的文件。比如这里的.gitkeep,这个文件是指空文件夹也提交到git 226 | ignore: ['.*'] 227 | } 228 | ]) 229 | ] 230 | }) 231 | // 导出一个promise 232 | module.exports = new Promise((resolve, reject) => { 233 | // process.env.PORT 可以在命令行指定端口号,比如PORT=2000 npm run dev,那访问就是http://localhost:2000 234 | // config.dev.port 这里配置是 8080 235 | portfinder.basePort = process.env.PORT || config.dev.port 236 | // 以配置的端口为基准,寻找可用的端口,比如:如果8080占用,那就8081,以此类推 237 | // github仓库 https://github.com/indexzero/node-portfinder 238 | portfinder.getPort((err, port) => { 239 | if (err) { 240 | reject(err) 241 | } else { 242 | // publish the new Port, necessary for e2e tests 243 | process.env.PORT = port 244 | // add port to devServer config 245 | devWebpackConfig.devServer.port = port 246 | 247 | // Add FriendlyErrorsPlugin 248 | devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({ 249 | compilationSuccessInfo: { 250 | messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`], 251 | }, 252 | // notifyOnErrors 这里配置是 true 253 | // onErrors 是一个函数,出错输出错误信息,系统原生的通知 254 | onErrors: config.dev.notifyOnErrors 255 | ? utils.createNotifierCallback() 256 | : undefined 257 | })) 258 | 259 | resolve(devWebpackConfig) 260 | } 261 | }) 262 | }) 263 | ``` 264 | 265 | ### `build/utils.js` 工具函数 266 | 267 | 上文`build/webpack.dev.conf.js`提到引入了`build/utils.js`工具函数。
268 | 该文件主要写了以下几个工具函数:
269 | 1、`assetsPath`返回输出路径,
270 | 2、`cssLoaders`返回相应的`css-loader`配置,
271 | 3、`styleLoaders`返回相应的处理样式的配置,
272 | 4、`createNotifierCallback`创建启动服务时出错时提示信息回调。 273 | 274 | 具体配置可以看该文件注释: 275 | 276 | ``` 277 | 'use strict' 278 | const path = require('path') 279 | // 引入配置文件config/index.js 280 | const config = require('../config') 281 | // 提取css的插件 282 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 283 | // 引入package.json配置 284 | const packageConfig = require('../package.json') 285 | // 返回路径 286 | exports.assetsPath = function (_path) { 287 | const assetsSubDirectory = process.env.NODE_ENV === 'production' 288 | // 二级目录 这里是 static 289 | ? config.build.assetsSubDirectory 290 | // 二级目录 这里是 static 291 | : config.dev.assetsSubDirectory 292 | 293 | // 生成跨平台兼容的路径 294 | // 更多查看Node API链接:https://nodejs.org/api/path.html#path_path_posix 295 | return path.posix.join(assetsSubDirectory, _path) 296 | } 297 | 298 | exports.cssLoaders = function (options) { 299 | // 作为参数传递进来的options对象 300 | // { 301 | // // sourceMap这里是true 302 | // sourceMap: true, 303 | // // 是否提取css到单独的css文件 304 | // extract: true, 305 | // // 是否使用postcss 306 | // usePostCSS: true 307 | // } 308 | options = options || {} 309 | 310 | const cssLoader = { 311 | loader: 'css-loader', 312 | options: { 313 | sourceMap: options.sourceMap 314 | } 315 | } 316 | 317 | const postcssLoader = { 318 | loader: 'postcss-loader', 319 | options: { 320 | sourceMap: options.sourceMap 321 | } 322 | } 323 | 324 | // generate loader string to be used with extract text plugin 325 | // 创建对应的loader配置 326 | function generateLoaders (loader, loaderOptions) { 327 | // 是否使用usePostCSS,来决定是否采用postcssLoader 328 | const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader] 329 | 330 | if (loader) { 331 | loaders.push({ 332 | loader: loader + '-loader', 333 | // 合并 loaderOptions 生成options 334 | options: Object.assign({}, loaderOptions, { 335 | sourceMap: options.sourceMap 336 | }) 337 | }) 338 | } 339 | 340 | // Extract CSS when that option is specified 341 | // (which is the case during production build) 342 | if (options.extract) { 343 | // 如果提取使用ExtractTextPlugin插件提取 344 | // 更多配置 看插件中文文档:https://webpack.docschina.org/plugins/extract-text-webpack-plugin/ 345 | return ExtractTextPlugin.extract({ 346 | // 指需要什么样的loader去编译文件 347 | // loader 被用于将资源转换成一个 CSS 导出模块 (必填) 348 | use: loaders, 349 | // loader(例如 'style-loader')应用于当 CSS 没有被提取(也就是一个额外的 chunk,当 allChunks: false) 350 | fallback: 'vue-style-loader' 351 | }) 352 | } else { 353 | return ['vue-style-loader'].concat(loaders) 354 | } 355 | } 356 | 357 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 358 | return { 359 | css: generateLoaders(), 360 | postcss: generateLoaders(), 361 | less: generateLoaders('less'), 362 | // sass indentedSyntax 语法缩进,类似下方格式 363 | // #main 364 | // color: blue 365 | // font-size: 0.3em 366 | sass: generateLoaders('sass', { indentedSyntax: true }), 367 | scss: generateLoaders('sass'), 368 | stylus: generateLoaders('stylus'), 369 | styl: generateLoaders('stylus') 370 | } 371 | } 372 | 373 | // Generate loaders for standalone style files (outside of .vue) 374 | // 最终会返回webpack css相关的配置 375 | exports.styleLoaders = function (options) { 376 | // { 377 | // // sourceMap这里是true 378 | // sourceMap: true, 379 | // // 是否提取css到单独的css文件 380 | // extract: true, 381 | // // 是否使用postcss 382 | // usePostCSS: true 383 | // } 384 | const output = [] 385 | const loaders = exports.cssLoaders(options) 386 | 387 | for (const extension in loaders) { 388 | const loader = loaders[extension] 389 | output.push({ 390 | test: new RegExp('\\.' + extension + '$'), 391 | use: loader 392 | }) 393 | } 394 | 395 | return output 396 | } 397 | 398 | // npm run dev 出错时, FriendlyErrorsPlugin插件 配置 onErrors输出错误信息 399 | exports.createNotifierCallback = () => { 400 | // 'node-notifier'是一个跨平台系统通知的页面,当遇到错误时,它能用系统原生的推送方式给你推送信息 401 | const notifier = require('node-notifier') 402 | 403 | return (severity, errors) => { 404 | if (severity !== 'error') return 405 | 406 | const error = errors[0] 407 | const filename = error.file && error.file.split('!').pop() 408 | 409 | notifier.notify({ 410 | title: packageConfig.name, 411 | message: severity + ': ' + error.name, 412 | subtitle: filename || '', 413 | icon: path.join(__dirname, 'logo.png') 414 | }) 415 | } 416 | } 417 | 418 | ``` 419 | 420 | ### `build/webpack.base.conf.js` `webpack`基本配置文件 421 | 422 | 上文`build/webpack.dev.conf.js`提到引入了`build/webpack.base.conf.js`这个`webpack`基本配置文件。
423 | 这个文件主要做了以下几件事情:
424 | 1、引入各种插件、配置等,其中引入了`build/vue-loader.conf.js`相关配置,
425 | 2、创建`eslint`规则配置,默认启用,
426 | 3、导出`webpack`配置对象,其中包含`context`,入口`entry`,输出`output`,`resolve`,`module`下的`rules`(处理对应文件的规则),和`node`相关的配置等。 427 | 428 | 具体可以看这个文件注释: 429 | 430 | ``` 431 | // 使用严格模式,更多严格模式可以查看 432 | // [阮一峰老师的es标准入门](http://es6.ruanyifeng.com/?search=%E4%B8%A5%E6%A0%BC%E6%A8%A1%E5%BC%8F&x=0&y=0#docs/function#%E4%B8%A5%E6%A0%BC%E6%A8%A1%E5%BC%8F) 433 | 'use strict' 434 | const path = require('path') 435 | // 引入工具函数 436 | const utils = require('./utils') 437 | // 引入配置文件,也就是config/index.js文件 438 | const config = require('../config') 439 | // 引入vue-loader的配置文件 440 | const vueLoaderConfig = require('./vue-loader.conf') 441 | // 定义获取绝对路径函数 442 | function resolve (dir) { 443 | return path.join(__dirname, '..', dir) 444 | } 445 | // 创建eslint配置 446 | const createLintingRule = () => ({ 447 | test: /\.(js|vue)$/, 448 | loader: 'eslint-loader', 449 | // 执行顺序,前置,还有一个选项是post是后置 450 | // 把 eslint-loader 的执行顺序放到最前面,防止其它 Loader 把处理后的代码交给 eslint-loader 去检查 451 | enforce: 'pre', 452 | // 包含文件夹 453 | include: [resolve('src'), resolve('test')], 454 | options: { 455 | // 使用友好的eslint提示插件 456 | formatter: require('eslint-friendly-formatter'), 457 | // eslint报错提示是否显示以遮罩形式显示在浏览器中 458 | // 这里showEslintErrorsInOverlay配置是false 459 | emitWarning: !config.dev.showEslintErrorsInOverlay 460 | } 461 | }) 462 | 463 | module.exports = { 464 | // 运行环境的上下文,就是实际的目录,也就是项目根目录 465 | context: path.resolve(__dirname, '../'), 466 | // 入口 467 | entry: { 468 | app: './src/main.js' 469 | }, 470 | // 输出 471 | output: { 472 | // 路径 这里是根目录下的dist 473 | path: config.build.assetsRoot, 474 | // 文件名 475 | filename: '[name].js', 476 | publicPath: process.env.NODE_ENV === 'production' 477 | // 这里是 /,但要上传到github pages等会路径不对,需要修改为./ 478 | ? config.build.assetsPublicPath 479 | // 这里配置是 / 480 | : config.dev.assetsPublicPath 481 | }, 482 | // Webpack 在启动后会从配置的入口模块出发找出所有依赖的模块,Resolve 配置 Webpack 如何寻找模块所对应的文件。 483 | resolve: { 484 | // 配置了这个,对应的扩展名可以省略 485 | extensions: ['.js', '.vue', '.json'], 486 | alias: { 487 | // 给定对象的键后的末尾添加 $,以表示精准匹配 node_modules/vue/dist/vue.esm.js 488 | // 引用 import Vue from 'vue'就是引入的这个文件最后export default Vue 导出的Vue; 489 | // 所以这句可以以任意大写字母命名 比如:import V from 'vue' 490 | 'vue$': 'vue/dist/vue.esm.js', 491 | // src别名 比如 :引入import HelloWorld from '@/components/HelloWorld' 492 | '@': resolve('src'), 493 | } 494 | }, 495 | // 定义一些文件的转换规则 496 | module: { 497 | rules: [ 498 | // 是否使用eslint 这里配置是true 499 | ...(config.dev.useEslint ? [createLintingRule()] : []), 500 | { 501 | test: /\.vue$/, 502 | // vue-loader中文文档:https://vue-loader-v14.vuejs.org/zh-cn/ 503 | loader: 'vue-loader', 504 | options: vueLoaderConfig 505 | }, 506 | { 507 | // js文件使用babel-loader转换 508 | test: /\.js$/, 509 | loader: 'babel-loader', 510 | include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')] 511 | }, 512 | { 513 | // 图片文件使用url-loader转换 514 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 515 | loader: 'url-loader', 516 | options: { 517 | // 限制大小10000B(bytes)以内,转成base64编码的dataURL字符串 518 | limit: 10000, 519 | // 输出路径 img/名称.7位hash.扩展名 520 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 521 | } 522 | }, 523 | { 524 | // 视频文件使用url-loader转换 525 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 526 | loader: 'url-loader', 527 | options: { 528 | limit: 10000, 529 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 530 | } 531 | }, 532 | { 533 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 534 | loader: 'url-loader', 535 | options: { 536 | limit: 10000, 537 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 538 | } 539 | } 540 | ] 541 | }, 542 | // 这里的node是一个对象,其中每个属性都是 Node.js 全局变量或模块的名称,每个 value 是以下其中之一 543 | // empty 提供空对象。 544 | // false 什么都不提供。 545 | // 更多查看 中文文档:https://webpack.docschina.org/configuration/node/ 546 | node: { 547 | // prevent webpack from injecting useless setImmediate polyfill because Vue 548 | // source contains it (although only uses it if it's native). 549 | // 防止webpack注入一些polyfill 因为Vue已经包含了这些。 550 | setImmediate: false, 551 | // prevent webpack from injecting mocks to Node native modules 552 | // that does not make sense for the client 553 | dgram: 'empty', 554 | fs: 'empty', 555 | net: 'empty', 556 | tls: 'empty', 557 | child_process: 'empty' 558 | } 559 | } 560 | ``` 561 | 562 | ### `build/vue-loader.conf.js` `vue-loader`配置文件 563 | 564 | 上文`build/webpack.dev.conf.js`提到引入了`build/vue-loader.conf.js`。 565 | 566 | 这个文件主要导出了一份`Vue-loader`的配置, 567 | 主要有:`loaders`,`cssSourceMap`,`cacheBusting`,`transformToRequire`。 568 | 569 | 具体看该文件注释: 570 | ``` 571 | 'use strict' 572 | const utils = require('./utils') 573 | const config = require('../config') 574 | const isProduction = process.env.NODE_ENV === 'production' 575 | const sourceMapEnabled = isProduction 576 | // 这里是true 577 | ? config.build.productionSourceMap 578 | // 这里是true 579 | : config.dev.cssSourceMap 580 | // 更多配置 可以查看vue-loader中文文档:https://vue-loader-v14.vuejs.org/zh-cn/ 581 | module.exports = { 582 | // cssLoaders 生成相应loader配置,具体看utils文件中的cssLoader 583 | loaders: utils.cssLoaders({ 584 | // 是否开启sourceMap,便于调试 585 | sourceMap: sourceMapEnabled, 586 | // 是否提取vue单文件的css 587 | extract: isProduction 588 | }), 589 | // 是否开启cssSourceMap,便于调试 590 | cssSourceMap: sourceMapEnabled, 591 | // 这里是true 592 | // 缓存破坏,进行sourceMap debug时,设置成false很有帮助。 593 | cacheBusting: config.dev.cacheBusting, 594 | // vue单文件中,在模板中的图片等资源引用转成require的形式。以便目标资源可以由 webpack 处理。 595 | transformToRequire: { 596 | video: ['src', 'poster'], 597 | source: 'src', 598 | img: 'src', 599 | // 默认配置会转换 标签上的 src 属性和 SVG 的 标签上的 xlink:href 属性。 600 | image: 'xlink:href' 601 | } 602 | } 603 | 604 | ``` 605 | 606 | 看完了这些文件相应配置,开发环境的相关配置就串起来了。其中`config/`文件夹下的配置,笔者都已经注释在`build/`文件夹下的对应的文件中,所以就不单独说明了。 607 | 608 | 那回过头来看,`package.json`的`scripts`中的`npm run build`配置,`node build/build.js`,其实就是用`node`去执行`build/build.js`文件。 609 | 610 | ### `build/build.js` `npm run build` 指定执行的文件 611 | 612 | 这个文件主要做了以下几件事情:
613 | 1、引入`build/check-versions`文件,检查`node`和`npm`的版本,
614 | 2、引入相关插件和配置,其中引入了`webpack`生产环境的配置`build/webpack.prod.conf.js`,
615 | 3、先控制台输出`loading`,删除`dist`目录下的文件,开始构建,构建失败和构建成功都给出相应的提示信息。 616 | 617 | 具体可以查看相应的注释: 618 | 619 | ``` 620 | 'use strict' 621 | // 检查node npm的版本 622 | require('./check-versions')() 623 | 624 | process.env.NODE_ENV = 'production' 625 | // 命令行中的loading 626 | const ora = require('ora') 627 | // 删除文件或文件夹 628 | const rm = require('rimraf') 629 | // 路径相关 630 | const path = require('path') 631 | // 控制台输入样式 chalk 更多查看:https://github.com/chalk/chalk 632 | const chalk = require('chalk') 633 | // 引入webpack 634 | const webpack = require('webpack') 635 | // 引入config/index.js 636 | const config = require('../config') 637 | // 引入 生产环境webpack配置 638 | const webpackConfig = require('./webpack.prod.conf') 639 | 640 | // 控制台输入开始构建loading 641 | const spinner = ora('building for production...') 642 | spinner.start() 643 | 644 | // 删除原有构建输出的目录文件 这里是dist 和 static 645 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 646 | // 如果出错,抛出错误 647 | if (err) throw err 648 | webpack(webpackConfig, (err, stats) => { 649 | // 关闭 控制台输入开始构建loading 650 | spinner.stop() 651 | // 如果出错,抛出错误 652 | if (err) throw err 653 | process.stdout.write(stats.toString({ 654 | colors: true, 655 | modules: false, 656 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 657 | chunks: false, 658 | chunkModules: false 659 | }) + '\n\n') 660 | 661 | // 如果有错,控制台输出构建失败 662 | if (stats.hasErrors()) { 663 | console.log(chalk.red(' Build failed with errors.\n')) 664 | process.exit(1) 665 | } 666 | 667 | // 控制台输出构建成功相关信息 668 | console.log(chalk.cyan(' Build complete.\n')) 669 | console.log(chalk.yellow( 670 | ' Tip: built files are meant to be served over an HTTP server.\n' + 671 | ' Opening index.html over file:// won\'t work.\n' 672 | )) 673 | }) 674 | }) 675 | 676 | ``` 677 | 678 | ### `build/check-versions` 检查`node`和`npm`版本 679 | 680 | 上文提到`build/check-versions` 检查`node`和`npm`版本,这个文件主要引入了一些插件和配置,最后导出一个函数,版本不符合预期就输出警告。 681 | 682 | 具体查看这个配置文件注释: 683 | 684 | ``` 685 | 'use strict' 686 | // 控制台输入样式 chalk 更多查看:https://github.com/chalk/chalk 687 | const chalk = require('chalk') 688 | // 语义化控制版本的插件 更多查看:https://github.com/npm/node-semver 689 | const semver = require('semver') 690 | // package.json配置 691 | const packageConfig = require('../package.json') 692 | // shell 脚本 Unix shell commands for Node.js 更多查看:https://github.com/shelljs/shelljs 693 | const shell = require('shelljs') 694 | 695 | function exec (cmd) { 696 | return require('child_process').execSync(cmd).toString().trim() 697 | } 698 | 699 | const versionRequirements = [ 700 | { 701 | name: 'node', 702 | currentVersion: semver.clean(process.version), 703 | // 这里配置是"node": ">= 6.0.0", 704 | versionRequirement: packageConfig.engines.node 705 | } 706 | ] 707 | // 需要使用npm 708 | if (shell.which('npm')) { 709 | versionRequirements.push({ 710 | name: 'npm', 711 | currentVersion: exec('npm --version'), 712 | // 这里配置是"npm": ">= 3.0.0" 713 | versionRequirement: packageConfig.engines.npm 714 | }) 715 | } 716 | // 导出一个检查版本的函数 717 | module.exports = function () { 718 | const warnings = [] 719 | 720 | for (let i = 0; i < versionRequirements.length; i++) { 721 | const mod = versionRequirements[i] 722 | 723 | // 当前版本不大于所需版本 724 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 725 | warnings.push(mod.name + ': ' + 726 | chalk.red(mod.currentVersion) + ' should be ' + 727 | chalk.green(mod.versionRequirement) 728 | ) 729 | } 730 | } 731 | 732 | // 如果有警告,全部输出到控制台 733 | if (warnings.length) { 734 | console.log('') 735 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 736 | console.log() 737 | 738 | for (let i = 0; i < warnings.length; i++) { 739 | const warning = warnings[i] 740 | console.log(' ' + warning) 741 | } 742 | 743 | console.log() 744 | process.exit(1) 745 | } 746 | } 747 | 748 | ``` 749 | 750 | ### `build/webpack.prod.conf.js` `webpack`生产环境配置 751 | 752 | 上文`build/build.js`提到,引入了这个配置文件。
753 | 这个文件主要做了以下几件事情:
754 | 1、引入一些插件和配置,其中引入了`build/webpack.base.conf.js` `webpack`基本配置文件,
755 | 2、用`DefinePlugin`定义环境,
756 | 3、合并基本配置,定义自己的配置`webpackConfig`,配置了一些`modules`下的`rules`,`devtools`配置,`output`输出配置,一些处理`js`、提取`css`、压缩`css`、输出`html`插件、提取公共代码等的 757 | `plugins`,
758 | 4、如果启用`gzip`,再使用相应的插件处理,
759 | 5、如果启用了分析打包后的插件,则用`webpack-bundle-analyzer`,
760 | 6、最后导出这份配置。 761 | 762 | 具体可以查看这个文件配置注释: 763 | 764 | ``` 765 | 'use strict' 766 | // 引入node路径相关 767 | const path = require('path') 768 | // 引入utils工具函数 769 | const utils = require('./utils') 770 | // 引入webpack 771 | const webpack = require('webpack') 772 | // 引入config/index.js配置文件 773 | const config = require('../config') 774 | // 合并webpack配置的插件 775 | const merge = require('webpack-merge') 776 | // 基本的webpack配置 777 | const baseWebpackConfig = require('./webpack.base.conf') 778 | // 拷贝文件和文件夹的插件 779 | const CopyWebpackPlugin = require('copy-webpack-plugin') 780 | // 压缩处理HTML的插件 781 | const HtmlWebpackPlugin = require('html-webpack-plugin') 782 | const ExtractTextPlugin = require('extract-text-webpack-plugin') 783 | // 压缩处理css的插件 784 | const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 785 | // 压缩处理js的插件 786 | const UglifyJsPlugin = require('uglifyjs-webpack-plugin') 787 | 788 | // 用DefinePlugin定义环境 789 | const env = process.env.NODE_ENV === 'testing' 790 | // 这里是 { NODE_ENV: '"testing"' } 791 | ? require('../config/test.env') 792 | // 这里是 { NODE_ENV: '"production"' } 793 | : require('../config/prod.env') 794 | // 合并基本webpack配置 795 | const webpackConfig = merge(baseWebpackConfig, { 796 | module: { 797 | // 通过styleLoaders函数生成样式的一些规则 798 | rules: utils.styleLoaders({ 799 | // sourceMap这里是true 800 | sourceMap: config.build.productionSourceMap, 801 | // 是否提取css到单独的css文件 802 | extract: true, 803 | // 是否使用postcss 804 | usePostCSS: true 805 | }) 806 | }, 807 | // 配置使用sourceMap true 这里是 #source-map 808 | devtool: config.build.productionSourceMap ? config.build.devtool : false, 809 | output: { 810 | // 这里是根目录下的dist 811 | path: config.build.assetsRoot, 812 | // 文件名称 chunkhash 813 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 814 | // chunks名称 chunkhash 815 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 816 | }, 817 | plugins: [ 818 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 819 | // 定义具体是什么环境 820 | new webpack.DefinePlugin({ 821 | 'process.env': env 822 | }), 823 | // 压缩js插件 824 | new UglifyJsPlugin({ 825 | uglifyOptions: { 826 | compress: { 827 | // 警告 828 | warnings: false 829 | // 构建后的文件 常用的配置还有这些 830 | // 去除console.log 默认为false。 传入true会丢弃对console函数的调用。 831 | // drop_console: true, 832 | // 去除debugger 833 | // drop_debugger: true, 834 | // 默认为null. 你可以传入一个名称的数组,而UglifyJs将会假定那些函数不会产生副作用。 835 | // pure_funcs: [ 'console.log', 'console.log.apply' ], 836 | } 837 | }, 838 | // 是否开启sourceMap 这里是true 839 | sourceMap: config.build.productionSourceMap, 840 | // 平行处理(同时处理)加快速度 841 | parallel: true 842 | }), 843 | // extract css into its own file 844 | // 提取css到单独的css文件 845 | new ExtractTextPlugin({ 846 | // 提取到相应的文件名 使用内容hash contenthash 847 | filename: utils.assetsPath('css/[name].[contenthash].css'), 848 | // Setting the following option to `false` will not extract CSS from codesplit chunks. 849 | // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack. 850 | // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 851 | // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110 852 | // allChunks 默认是false,true指提取所有chunks包括动态引入的组件。 853 | allChunks: true, 854 | }), 855 | // Compress extracted CSS. We are using this plugin so that possible 856 | // duplicated CSS from different components can be deduped. 857 | new OptimizeCSSPlugin({ 858 | // 这里配置是true 859 | cssProcessorOptions: config.build.productionSourceMap 860 | ? { safe: true, map: { inline: false } } 861 | : { safe: true } 862 | }), 863 | // generate dist index.html with correct asset hash for caching. 864 | // you can customize output by editing /index.html 865 | // see https://github.com/ampedandwired/html-webpack-plugin 866 | new HtmlWebpackPlugin({ 867 | // 输出html名称 868 | filename: process.env.NODE_ENV === 'testing' 869 | ? 'index.html' 870 | // 这里是 根目录下的dist/index.html 871 | : config.build.index, 872 | // 使用哪个模板 873 | template: 'index.html', 874 | // inject 默认值 true,script标签位于html文件的 body 底部 875 | // body 通true, header, script 标签位于 head 标签内 876 | // false 不插入生成的 js 文件,只是单纯的生成一个 html 文件 877 | inject: true, 878 | // 压缩 879 | minify: { 880 | // 删除注释 881 | removeComments: true, 882 | // 删除空格和换行 883 | collapseWhitespace: true, 884 | // 删除html标签中属性的双引号 885 | removeAttributeQuotes: true 886 | // 更多配置查看html-minifier插件 887 | // more options: 888 | // https://github.com/kangax/html-minifier#options-quick-reference 889 | }, 890 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 891 | // 在chunk被插入到html之前,你可以控制它们的排序。允许的值 ‘none’ | ‘auto’ | ‘dependency’ | {function} 默认为‘auto’. 892 | // dependency 依赖(从属) 893 | chunksSortMode: 'dependency' 894 | }), 895 | // keep module.id stable when vendor modules does not change 896 | // 根据代码内容生成普通模块的id,确保源码不变,moduleID不变。 897 | new webpack.HashedModuleIdsPlugin(), 898 | // enable scope hoisting 899 | // 开启作用域提升 webpack3新的特性,作用是让代码文件更小、运行的更快 900 | new webpack.optimize.ModuleConcatenationPlugin(), 901 | // split vendor js into its own file 902 | // 提取公共代码 903 | new webpack.optimize.CommonsChunkPlugin({ 904 | name: 'vendor', 905 | minChunks (module) { 906 | // any required modules inside node_modules are extracted to vendor 907 | return ( 908 | module.resource && 909 | /\.js$/.test(module.resource) && 910 | module.resource.indexOf( 911 | path.join(__dirname, '../node_modules') 912 | ) === 0 913 | ) 914 | } 915 | }), 916 | // extract webpack runtime and module manifest to its own file in order to 917 | // prevent vendor hash from being updated whenever app bundle is updated 918 | // 提取公共代码 919 | new webpack.optimize.CommonsChunkPlugin({ 920 | // 把公共的部分放到 manifest 中 921 | name: 'manifest', 922 | // 传入 `Infinity` 会马上生成 公共chunk,但里面没有模块。 923 | minChunks: Infinity 924 | }), 925 | // This instance extracts shared chunks from code splitted chunks and bundles them 926 | // in a separate chunk, similar to the vendor chunk 927 | // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk 928 | // 提取动态组件 929 | new webpack.optimize.CommonsChunkPlugin({ 930 | name: 'app', 931 | // 如果设置为 `true`,一个异步的 公共chunk 会作为 `options.name` 的子模块,和 `options.chunks` 的兄弟模块被创建。 932 | // 它会与 `options.chunks` 并行被加载。可以通过提供想要的字符串,而不是 `true` 来对输出的文件进行更换名称。 933 | async: 'vendor-async', 934 | // 如果设置为 `true`,所有 公共chunk 的子模块都会被选择 935 | children: true, 936 | // 最小3个,包含3,chunk的时候提取 937 | minChunks: 3 938 | }), 939 | 940 | // copy custom static assets 941 | // 把static资源复制到相应目录。 942 | new CopyWebpackPlugin([ 943 | { 944 | from: path.resolve(__dirname, '../static'), 945 | // 这里配置是static 946 | to: config.build.assetsSubDirectory, 947 | // 忽略.开头的文件。比如这里的.gitkeep,这个文件是指空文件夹也提交到git 948 | ignore: ['.*'] 949 | } 950 | ]) 951 | ] 952 | }) 953 | // 如果开始gzip压缩,使用compression-webpack-plugin插件处理。这里配置是false 954 | // 需要使用是需要安装 npm i compression-webpack-plugin -D 955 | if (config.build.productionGzip) { 956 | const CompressionWebpackPlugin = require('compression-webpack-plugin') 957 | 958 | webpackConfig.plugins.push( 959 | new CompressionWebpackPlugin({ 960 | // asset: 目标资源名称。 [file] 会被替换成原始资源。 961 | // [path] 会被替换成原始资源的路径, [query] 会被替换成查询字符串。默认值是 "[path].gz[query]"。 962 | asset: '[path].gz[query]', 963 | // algorithm: 可以是 function(buf, callback) 或者字符串。对于字符串来说依照 zlib 的算法(或者 zopfli 的算法)。默认值是 "gzip"。 964 | algorithm: 'gzip', 965 | // test: 所有匹配该正则的资源都会被处理。默认值是全部资源。 966 | // config.build.productionGzipExtensions 这里是['js', 'css'] 967 | test: new RegExp( 968 | '\\.(' + 969 | config.build.productionGzipExtensions.join('|') + 970 | ')$' 971 | ), 972 | // threshold: 只有大小大于该值的资源会被处理。单位是 bytes。默认值是 0。 973 | threshold: 10240, 974 | // minRatio: 只有压缩率小于这个值的资源才会被处理。默认值是 0.8。 975 | minRatio: 0.8 976 | }) 977 | ) 978 | } 979 | 980 | // 输出分析的插件 运行npm run build --report 981 | // config.build.bundleAnalyzerReport这里是 process.env.npm_config_report 982 | // build结束后会自定打开 http://127.0.0.1:8888 链接 983 | if (config.build.bundleAnalyzerReport) { 984 | // 更多查看链接地址:https://www.npmjs.com/package/webpack-bundle-analyzer 985 | const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 986 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 987 | } 988 | // 当然也可以用官方提供的网站 http://webpack.github.io/analyse/#home 989 | // 运行类似 webpack --profile --json > stats.json 命令 990 | // 把生成的构建信息stats.json上传即可 991 | 992 | 993 | // 最终导出 webpackConfig 994 | module.exports = webpackConfig 995 | 996 | ``` 997 | 至此,我们就分析完了`package.json`中的`npm run dev`和`npm run build`两个命令。测试相关的类似就略过吧。 998 | 999 | `npm run lint`,`.eslintrc.js`中的配置不多,更多可以查看[eslint英文文档](https://eslint.org/)或[`eslint`中文官网](http://eslint.cn/),所以也略过吧。不过提一下,把`eslint`整合到`git`工作流。可以安装`husky`,`npm i husky -S`。安装后,配置`package.json`的`scripts`中,配置`precommit`,具体如下: 1000 | ``` 1001 | "scripts": { 1002 | "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs", 1003 | "precommit": "npm run lint", 1004 | }, 1005 | ``` 1006 | 配置好后,每次`git commit -m`提交会检查代码是否通过`eslint`校验,如果没有校验通过则提交失败。还可以配置`prepush`。`husky`不断在更新,现在可能与原先的配置不太相同了,具体查看[husky github仓库](https://github.com/typicode/husky)。原理就是`git-hooks`,`pre-commit`的钩子。对`shell`脚本熟悉的同学也可以自己写一份`pre-commit`。复制到项目的`.git/hooks/pre-commit`中。不需要依赖`husky`包。我司就是用的`shell`脚本。 1007 | 1008 | 1009 | 最后提一下`.babelrc`文件中的配置。 1010 | 1011 | ### `.babelrc` `babel`相关配置 1012 | 配置了一些转码规则。这里附上两个链接:[`babel`英文官网](https://babeljs.io/)和[`babel`的中文官网](https://babel.bootcss.com/)。 1013 | 1014 | 具体看文件中的配置注释: 1015 | ``` 1016 | { 1017 | // presets指明转码的规则 1018 | "presets": [ 1019 | // env项是借助插件babel-preset-env,下面这个配置说的是babel对es6,es7,es8进行转码,并且设置amd,commonjs这样的模块化文件,不进行转码 1020 | ["env", { 1021 | "modules": false, 1022 | "targets": { 1023 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 1024 | } 1025 | }], 1026 | "stage-2" 1027 | ], 1028 | // plugins 属性告诉 Babel 要使用哪些插件,插件可以控制如何转换代码。 1029 | // transform-vue-jsx 表明可以在项目中使用jsx语法,会使用这个插件转换 1030 | "plugins": ["transform-vue-jsx", "transform-runtime"], 1031 | // 在特定的环境中所执行的转码规则,当环境变量是下面的test就会覆盖上面的设置 1032 | "env": { 1033 | // test 是提前设置的环境变量,如果没有设置BABEL_ENV则使用NODE_ENV,如果都没有设置默认就是development 1034 | "test": { 1035 | "presets": ["env", "stage-2"], 1036 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 1037 | } 1038 | } 1039 | } 1040 | ``` 1041 | 1042 | 文件中`presets`中有配置`env`和`stage-2`,可能不知道是什么。这里引用[深入浅出webpack](http://webpack.wuhaolin.cn/3%E5%AE%9E%E6%88%98/3-1%E4%BD%BF%E7%94%A8ES6%E8%AF%AD%E8%A8%80.html)书中,第三章,`3-1`使用`ES6`语言 小节的一段,解释一下。
1043 | >`presets` 属性告诉 `Babel` 要转换的源码使用了哪些新的语法特性,一个 Presets 对一组新语法特性提供支持,多个 `Presets` 可以叠加。 `Presets` 其实是一组 `Plugins` 的集合,每一个 `Plugin` 完成一个新语法的转换工作。`Presets` 是按照 `ECMAScript` 草案来组织的,通常可以分为以下三大类(书中就是说三大类,我发现就两点~~~):
1044 | >1、已经被写入 ECMAScript 标准里的特性,由于之前每年都有新特性被加入到标准里,所以又可细分为:
1045 | es2015 包含在2015里加入的新特性;
1046 | es2016 包含在2016里加入的新特性;
1047 | es2017 包含在2017里加入的新特性;
1048 | es2017 包含在2017里加入的新特性;
1049 | env 包含当前所有 ECMAScript 标准里的最新特性。
1050 | >2、被社区提出来的但还未被写入 `ECMAScript` 标准里特性,这其中又分为以下四种:
1051 | `stage0` 只是一个美好激进的想法,有 `Babel` 插件实现了对这些特性的支持,但是不确定是否会被定为标准;
1052 | `stage1` 值得被纳入标准的特性;
1053 | `stage2` 该特性规范已经被起草,将会被纳入标准里;
1054 | `stage3` 该特性规范已经定稿,各大浏览器厂商和 `` 社区开始着手实现;
1055 | `stage4` 在接下来的一年将会加入到标准里去。
1056 | 1057 | 至此,就算相对完整的分析完了`Vue-cli`(版本`v2.9.3`)搭建的`webpack`项目工程。希望对大家有所帮助。
1058 | **项目放在笔者的`github`上,[分析vue-cli@2.9.3 搭建的webpack项目工程](https://github.com/lxchuan12/analyse-vue-cli)。方便大家克隆下载,或者在线查看。同时也求个`star` `^_^`,也是对笔者的一种鼓励和支持。**
1059 | 笔者知识能力有限,文章有什么不妥之处,欢迎指出~ 1060 | 1061 | ### 关于 1062 | 作者:常以**若川**为名混迹于江湖。前端路上 | PPT爱好者 | 所知甚少,唯善学
1063 | [个人博客](https://lxchuan12.github.io/)
1064 | [segmentfault个人主页](https://segmentfault.com/u/lxchuan12)
1065 | [掘金个人主页](https://juejin.im/user/57974dc55bbb500063f522fd/posts)
1066 | [知乎](https://www.zhihu.com/people/lxchuan12/activities)
1067 | [github](https://github.com/lxchuan12)
1068 | 1069 | ### 小结 1070 | 1、分析这些,逐行注释,还是需要一些时间的。其中有些不是很明白的地方,及时查阅相应的官方文档和插件文档(建议看英文文档和最新的文档),不过文档没写明白的地方,可以多搜索一些别人的博客文章,相对比较清晰明了。
1071 | 2、前端发展太快,这个`Vue-cli@2.9.3` `webpack`版本还是`v3.x`,webpack现在官方版本已经是`v4.12.0`,相信不久后,`Vue-cli`也将发布支持`webpack v4.x`的版本,`v3.0.0`已经是`beta.16`了。
1072 | 3、后续有余力,可能会继续分析新版的`vue-cli`构建的`webpack`项目工程。 1073 | -------------------------------------------------------------------------------- /dist/static/js/vendor.7fed9fa7b7ba482410b7.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([0],{"/ocq":function(t,e,n){"use strict"; 2 | /** 3 | * vue-router v3.0.1 4 | * (c) 2017 Evan You 5 | * @license MIT 6 | */function r(t,e){0}function i(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}var o={name:"router-view",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,i=e.parent,o=e.data;o.routerView=!0;for(var a=i.$createElement,s=n.name,c=i.$route,u=i._routerViewCache||(i._routerViewCache={}),f=0,l=!1;i&&i._routerRoot!==i;)i.$vnode&&i.$vnode.data.routerView&&f++,i._inactive&&(l=!0),i=i.$parent;if(o.routerViewDepth=f,l)return a(u[s],o,r);var p=c.matched[f];if(!p)return u[s]=null,a();var d=u[s]=p.components[s];o.registerRouteInstance=function(t,e){var n=p.instances[s];(e&&n!==t||!e&&n===t)&&(p.instances[s]=e)},(o.hook||(o.hook={})).prepatch=function(t,e){p.instances[s]=e.componentInstance};var v=o.props=function(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}(c,p.props&&p.props[s]);if(v){v=o.props=function(t,e){for(var n in e)t[n]=e[n];return t}({},v);var h=o.attrs=o.attrs||{};for(var m in v)d.props&&m in d.props||(h[m]=v[m],delete v[m])}return a(d,o,r)}};var a=/[!'()*]/g,s=function(t){return"%"+t.charCodeAt(0).toString(16)},c=/%2C/g,u=function(t){return encodeURIComponent(t).replace(a,s).replace(c,",")},f=decodeURIComponent;function l(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=f(n.shift()),i=n.length>0?f(n.join("=")):null;void 0===e[r]?e[r]=i:Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]}),e):e}function p(t){var e=t?Object.keys(t).map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return u(e);if(Array.isArray(n)){var r=[];return n.forEach(function(t){void 0!==t&&(null===t?r.push(u(e)):r.push(u(e)+"="+u(t)))}),r.join("&")}return u(e)+"="+u(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}var d=/\/?$/;function v(t,e,n,r){var i=r&&r.options.stringifyQuery,o=e.query||{};try{o=h(o)}catch(t){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:o,params:e.params||{},fullPath:y(e,i),matched:t?function(t){var e=[];for(;t;)e.unshift(t),t=t.parent;return e}(t):[]};return n&&(a.redirectedFrom=y(n,i)),Object.freeze(a)}function h(t){if(Array.isArray(t))return t.map(h);if(t&&"object"==typeof t){var e={};for(var n in t)e[n]=h(t[n]);return e}return t}var m=v(null,{path:"/"});function y(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var i=t.hash;return void 0===i&&(i=""),(n||"/")+(e||p)(r)+i}function g(t,e){return e===m?t===e:!!e&&(t.path&&e.path?t.path.replace(d,"")===e.path.replace(d,"")&&t.hash===e.hash&&_(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&_(t.query,e.query)&&_(t.params,e.params)))}function _(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){var r=t[n],i=e[n];return"object"==typeof r&&"object"==typeof i?_(r,i):String(r)===String(i)})}var b,w=[String,Object],$=[String,Array],x={name:"router-link",props:{to:{type:w,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,event:{type:$,default:"click"}},render:function(t){var e=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),o=i.location,a=i.route,s=i.href,c={},u=n.options.linkActiveClass,f=n.options.linkExactActiveClass,l=null==u?"router-link-active":u,p=null==f?"router-link-exact-active":f,h=null==this.activeClass?l:this.activeClass,m=null==this.exactActiveClass?p:this.exactActiveClass,y=o.path?v(null,o,null,n):a;c[m]=g(r,y),c[h]=this.exact?c[m]:function(t,e){return 0===t.path.replace(d,"/").indexOf(e.path.replace(d,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(r,y);var _=function(t){C(t)&&(e.replace?n.replace(o):n.push(o))},w={click:C};Array.isArray(this.event)?this.event.forEach(function(t){w[t]=_}):w[this.event]=_;var $={class:c};if("a"===this.tag)$.on=w,$.attrs={href:s};else{var x=function t(e){if(e)for(var n,r=0;r=0&&(e=t.slice(r),t=t.slice(0,r));var i=t.indexOf("?");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{path:t,query:n,hash:e}}(i.path||""),c=e&&e.path||"/",u=s.path?O(s.path,c,n||i.append):c,f=function(t,e,n){void 0===e&&(e={});var r,i=n||l;try{r=i(t||"")}catch(t){r={}}for(var o in e)r[o]=e[o];return r}(s.query,i.query,r&&r.options.parseQuery),p=i.hash||s.hash;return p&&"#"!==p.charAt(0)&&(p="#"+p),{_normalized:!0,path:u,query:f,hash:p}}function X(t,e){for(var n in e)t[n]=e[n];return t}function G(t,e){var n=J(t),r=n.pathList,i=n.pathMap,o=n.nameMap;function a(t,n,a){var s=W(t,n,!1,e),u=s.name;if(u){var f=o[u];if(!f)return c(null,s);var l=f.regex.keys.filter(function(t){return!t.optional}).map(function(t){return t.name});if("object"!=typeof s.params&&(s.params={}),n&&"object"==typeof n.params)for(var p in n.params)!(p in s.params)&&l.indexOf(p)>-1&&(s.params[p]=n.params[p]);if(f)return s.path=K(f.path,s.params),c(f,s,a)}else if(s.path){s.params={};for(var d=0;d=t.length?n():t[i]?e(t[i],function(){r(i+1)}):r(i+1)};r(0)}function ht(t){return function(e,n,r){var o=!1,a=0,s=null;mt(t,function(t,e,n,c){if("function"==typeof t&&void 0===t.cid){o=!0,a++;var u,f=_t(function(e){var i;((i=e).__esModule||gt&&"Module"===i[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:b.extend(e),n.components[c]=e,--a<=0&&r()}),l=_t(function(t){var e="Failed to resolve async component "+c+": "+t;s||(s=i(t)?t:new Error(e),r(s))});try{u=t(f,l)}catch(t){l(t)}if(u)if("function"==typeof u.then)u.then(f,l);else{var p=u.component;p&&"function"==typeof p.then&&p.then(f,l)}}}),o||r()}}function mt(t,e){return yt(t.map(function(t){return Object.keys(t.components).map(function(n){return e(t.components[n],t.instances[n],t,n)})}))}function yt(t){return Array.prototype.concat.apply([],t)}var gt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function _t(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var bt=function(t,e){this.router=t,this.base=function(t){if(!t)if(A){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};function wt(t,e,n,r){var i=mt(t,function(t,r,i,o){var a=function(t,e){"function"!=typeof t&&(t=b.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map(function(t){return n(t,r,i,o)}):n(a,r,i,o)});return yt(r?i.reverse():i)}function $t(t,e){if(e)return function(){return t.apply(e,arguments)}}bt.prototype.listen=function(t){this.cb=t},bt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},bt.prototype.onError=function(t){this.errorCbs.push(t)},bt.prototype.transitionTo=function(t,e,n){var r=this,i=this.router.match(t,this.current);this.confirmTransition(i,function(){r.updateRoute(i),e&&e(i),r.ensureURL(),r.ready||(r.ready=!0,r.readyCbs.forEach(function(t){t(i)}))},function(t){n&&n(t),t&&!r.ready&&(r.ready=!0,r.readyErrorCbs.forEach(function(e){e(t)}))})},bt.prototype.confirmTransition=function(t,e,n){var o=this,a=this.current,s=function(t){i(t)&&(o.errorCbs.length?o.errorCbs.forEach(function(e){e(t)}):(r(),console.error(t))),n&&n(t)};if(g(t,a)&&t.matched.length===a.matched.length)return this.ensureURL(),s();var c=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n=0?e.slice(0,n):e)+"#"+t}function Tt(t){st?pt(St(t)):window.location.hash=t}function Et(t){st?dt(St(t)):window.location.replace(St(t))}var jt=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)},n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)},n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)})}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(bt),Lt=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=G(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!st&&!1!==t.fallback,this.fallback&&(e="hash"),A||(e="abstract"),this.mode=e,e){case"history":this.history=new xt(this,t.base);break;case"hash":this.history=new kt(this,t.base,this.fallback);break;case"abstract":this.history=new jt(this,t.base);break;default:0}},Rt={currentRoute:{configurable:!0}};function It(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Lt.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Rt.currentRoute.get=function(){return this.history&&this.history.current},Lt.prototype.init=function(t){var e=this;if(this.apps.push(t),!this.app){this.app=t;var n=this.history;if(n instanceof xt)n.transitionTo(n.getCurrentLocation());else if(n instanceof kt){var r=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen(function(t){e.apps.forEach(function(e){e._route=t})})}},Lt.prototype.beforeEach=function(t){return It(this.beforeHooks,t)},Lt.prototype.beforeResolve=function(t){return It(this.resolveHooks,t)},Lt.prototype.afterEach=function(t){return It(this.afterHooks,t)},Lt.prototype.onReady=function(t,e){this.history.onReady(t,e)},Lt.prototype.onError=function(t){this.history.onError(t)},Lt.prototype.push=function(t,e,n){this.history.push(t,e,n)},Lt.prototype.replace=function(t,e,n){this.history.replace(t,e,n)},Lt.prototype.go=function(t){this.history.go(t)},Lt.prototype.back=function(){this.go(-1)},Lt.prototype.forward=function(){this.go(1)},Lt.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},Lt.prototype.resolve=function(t,e,n){var r=W(t,e||this.history.current,n,this),i=this.match(r,e),o=i.redirectedFrom||i.fullPath;return{location:r,route:i,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?S(t+"/"+r):r}(this.history.base,o,this.mode),normalizedTo:r,resolved:i}},Lt.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Lt.prototype,Rt),Lt.install=k,Lt.version="3.0.1",A&&window.Vue&&window.Vue.use(Lt),e.a=Lt},"7+uW":function(t,e,n){"use strict";(function(t){ 7 | /*! 8 | * Vue.js v2.5.16 9 | * (c) 2014-2018 Evan You 10 | * Released under the MIT License. 11 | */ 12 | var n=Object.freeze({});function r(t){return void 0===t||null===t}function i(t){return void 0!==t&&null!==t}function o(t){return!0===t}function a(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function s(t){return null!==t&&"object"==typeof t}var c=Object.prototype.toString;function u(t){return"[object Object]"===c.call(t)}function f(t){return"[object RegExp]"===c.call(t)}function l(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function p(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function d(t){var e=parseFloat(t);return isNaN(e)?t:e}function v(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i-1)return t.splice(n,1)}}var g=Object.prototype.hasOwnProperty;function _(t,e){return g.call(t,e)}function b(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var w=/-(\w)/g,$=b(function(t){return t.replace(w,function(t,e){return e?e.toUpperCase():""})}),x=b(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),C=/\B([A-Z])/g,k=b(function(t){return t.replace(C,"-$1").toLowerCase()});var A=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function O(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function S(t,e){for(var n in e)t[n]=e[n];return t}function T(t){for(var e={},n=0;n0,Z=W&&W.indexOf("edge/")>0,Y=(W&&W.indexOf("android"),W&&/iphone|ipad|ipod|ios/.test(W)||"ios"===J),Q=(W&&/chrome\/\d+/.test(W),{}.watch),tt=!1;if(z)try{var et={};Object.defineProperty(et,"passive",{get:function(){tt=!0}}),window.addEventListener("test-passive",null,et)}catch(t){}var nt=function(){return void 0===q&&(q=!z&&!K&&void 0!==t&&"server"===t.process.env.VUE_ENV),q},rt=z&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function it(t){return"function"==typeof t&&/native code/.test(t.toString())}var ot,at="undefined"!=typeof Symbol&&it(Symbol)&&"undefined"!=typeof Reflect&&it(Reflect.ownKeys);ot="undefined"!=typeof Set&&it(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 st=E,ct=0,ut=function(){this.id=ct++,this.subs=[]};ut.prototype.addSub=function(t){this.subs.push(t)},ut.prototype.removeSub=function(t){y(this.subs,t)},ut.prototype.depend=function(){ut.target&&ut.target.addDep(this)},ut.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e-1)if(o&&!_(i,"default"))a=!1;else if(""===a||a===k(t)){var c=Ht(String,i.type);(c<0||s0&&(fe((u=t(u,(n||"")+"_"+c))[0])&&fe(l)&&(s[f]=mt(l.text+u[0].text),u.shift()),s.push.apply(s,u)):a(u)?fe(l)?s[f]=mt(l.text+u):""!==u&&s.push(mt(u)):fe(u)&&fe(l)?s[f]=mt(l.text+u.text):(o(e._isVList)&&i(u.tag)&&r(u.key)&&i(n)&&(u.key="__vlist"+n+"_"+c+"__"),s.push(u)));return s}(t):void 0}function fe(t){return i(t)&&i(t.text)&&!1===t.isComment}function le(t,e){return(t.__esModule||at&&"Module"===t[Symbol.toStringTag])&&(t=t.default),s(t)?e.extend(t):t}function pe(t){return t.isComment&&t.asyncFactory}function de(t){if(Array.isArray(t))for(var e=0;eTe&&Ce[n].id>t.id;)n--;Ce.splice(n+1,0,t)}else Ce.push(t);Oe||(Oe=!0,te(Ee))}}(this)},Le.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||s(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){Bt(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},Le.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Le.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},Le.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var Re={enumerable:!0,configurable:!0,get:E,set:E};function Ie(t,e,n){Re.get=function(){return this[e][n]},Re.set=function(t){this[e][n]=t},Object.defineProperty(t,n,Re)}function Ne(t){t._watchers=[];var e=t.$options;e.props&&function(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[];t.$parent&&$t(!1);var o=function(o){i.push(o);var a=Dt(o,e,n,t);Ot(r,o,a),o in t||Ie(t,"_props",o)};for(var a in e)o(a);$t(!0)}(t,e.props),e.methods&&function(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?E:A(e[n],t)}(t,e.methods),e.data?function(t){var e=t.$options.data;u(e=t._data="function"==typeof e?function(t,e){lt();try{return t.call(e,e)}catch(t){return Bt(t,e,"data()"),{}}finally{pt()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props,i=(t.$options.methods,n.length);for(;i--;){var o=n[i];0,r&&_(r,o)||U(o)||Ie(t,"_data",o)}At(e,!0)}(t):At(t._data={},!0),e.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=nt();for(var i in e){var o=e[i],a="function"==typeof o?o:o.get;0,r||(n[i]=new Le(t,a||E,E,Pe)),i in t||Me(t,i,o)}}(t,e.computed),e.watch&&e.watch!==Q&&function(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i=0||n.indexOf(t[i])<0)&&r.push(t[i]);return r}return t}function pn(t){this._init(t)}function dn(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name;var a=function(t){this._init(t)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=e++,a.options=Pt(n.options,t),a.super=n,a.options.props&&function(t){var e=t.options.props;for(var n in e)Ie(t.prototype,"_props",n)}(a),a.options.computed&&function(t){var e=t.options.computed;for(var n in e)Me(t.prototype,n,e[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,M.forEach(function(t){a[t]=n[t]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=S({},a.options),i[r]=a,a}}function vn(t){return t&&(t.Ctor.options.name||t.tag)}function hn(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!f(t)&&t.test(e)}function mn(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=vn(a.componentOptions);s&&!e(s)&&yn(n,o,r,i)}}}function yn(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,y(n,e)}!function(t){t.prototype._init=function(t){var e=this;e._uid=un++,e._isVue=!0,t&&t._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r,n._parentElm=e._parentElm,n._refElm=e._refElm;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(e,t):e.$options=Pt(fn(e.constructor),t||{},e),e._renderProxy=e,e._self=e,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(e),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&me(t,e)}(e),function(t){t._vnode=null,t._staticTrees=null;var e=t.$options,r=t.$vnode=e._parentVnode,i=r&&r.context;t.$slots=ye(e._renderChildren,i),t.$scopedSlots=n,t._c=function(e,n,r,i){return cn(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return cn(t,e,n,r,i,!0)};var o=r&&r.data;Ot(t,"$attrs",o&&o.attrs||n,null,!0),Ot(t,"$listeners",e._parentListeners||n,null,!0)}(e),xe(e,"beforeCreate"),function(t){var e=Ue(t.$options.inject,t);e&&($t(!1),Object.keys(e).forEach(function(n){Ot(t,n,e[n])}),$t(!0))}(e),Ne(e),function(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}(e),xe(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(pn),function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=St,t.prototype.$delete=Tt,t.prototype.$watch=function(t,e,n){if(u(e))return Fe(this,t,e,n);(n=n||{}).user=!0;var r=new Le(this,t,e,n);return n.immediate&&e.call(this,r.value),function(){r.teardown()}}}(pn),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){if(Array.isArray(t))for(var r=0,i=t.length;r1?O(n):n;for(var r=O(arguments,1),i=0,o=n.length;iparseInt(this.max)&&yn(a,s[0],s,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return F}};Object.defineProperty(t,"config",e),t.util={warn:st,extend:S,mergeOptions:Pt,defineReactive:Ot},t.set=St,t.delete=Tt,t.nextTick=te,t.options=Object.create(null),M.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,S(t.options.components,_n),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=Pt(this.options,t),this}}(t),dn(t),function(t){M.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}(t)}(pn),Object.defineProperty(pn.prototype,"$isServer",{get:nt}),Object.defineProperty(pn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(pn,"FunctionalRenderContext",{value:Qe}),pn.version="2.5.16";var bn=v("style,class"),wn=v("input,textarea,option,select,progress"),$n=function(t,e,n){return"value"===n&&wn(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},xn=v("contenteditable,draggable,spellcheck"),Cn=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),kn="http://www.w3.org/1999/xlink",An=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},On=function(t){return An(t)?t.slice(6,t.length):""},Sn=function(t){return null==t||!1===t};function Tn(t){for(var e=t.data,n=t,r=t;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=En(r.data,e));for(;i(n=n.parent);)n&&n.data&&(e=En(e,n.data));return function(t,e){if(i(t)||i(e))return jn(t,Ln(e));return""}(e.staticClass,e.class)}function En(t,e){return{staticClass:jn(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function jn(t,e){return t?e?t+" "+e:t:e||""}function Ln(t){return Array.isArray(t)?function(t){for(var e,n="",r=0,o=t.length;r-1?rr(t,e,n):Cn(e)?Sn(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):xn(e)?t.setAttribute(e,Sn(n)||"false"===n?"false":"true"):An(e)?Sn(n)?t.removeAttributeNS(kn,On(e)):t.setAttributeNS(kn,e,n):rr(t,e,n)}function rr(t,e,n){if(Sn(n))t.removeAttribute(e);else{if(X&&!G&&"TEXTAREA"===t.tagName&&"placeholder"===e&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var ir={create:er,update:er};function or(t,e){var n=e.elm,o=e.data,a=t.data;if(!(r(o.staticClass)&&r(o.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Tn(e),c=n._transitionClasses;i(c)&&(s=jn(s,Ln(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var ar,sr,cr,ur,fr,lr,pr={create:or,update:or},dr=/[\w).+\-_$\]]/;function vr(t){var e,n,r,i,o,a=!1,s=!1,c=!1,u=!1,f=0,l=0,p=0,d=0;for(r=0;r=0&&" "===(h=t.charAt(v));v--);h&&dr.test(h)||(u=!0)}}else void 0===i?(d=r+1,i=t.slice(0,r).trim()):m();function m(){(o||(o=[])).push(t.slice(d,r).trim()),d=r+1}if(void 0===i?i=t.slice(0,r).trim():0!==d&&m(),o)for(r=0;r-1?{exp:t.slice(0,ur),key:'"'+t.slice(ur+1)+'"'}:{exp:t,key:null};sr=t,ur=fr=lr=0;for(;!Sr();)Tr(cr=Or())?jr(cr):91===cr&&Er(cr);return{exp:t.slice(0,fr),key:t.slice(fr+1,lr)}}(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function Or(){return sr.charCodeAt(++ur)}function Sr(){return ur>=ar}function Tr(t){return 34===t||39===t}function Er(t){var e=1;for(fr=ur;!Sr();)if(Tr(t=Or()))jr(t);else if(91===t&&e++,93===t&&e--,0===e){lr=ur;break}}function jr(t){for(var e=t;!Sr()&&(t=Or())!==e;);}var Lr,Rr="__r",Ir="__c";function Nr(t,e,n,r,i){var o;e=(o=e)._withTask||(o._withTask=function(){Gt=!0;var t=o.apply(null,arguments);return Gt=!1,t}),n&&(e=function(t,e,n){var r=Lr;return function i(){null!==t.apply(null,arguments)&&Pr(e,i,n,r)}}(e,t,r)),Lr.addEventListener(t,e,tt?{capture:r,passive:i}:r)}function Pr(t,e,n,r){(r||Lr).removeEventListener(t,e._withTask||e,n)}function Mr(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Lr=e.elm,function(t){if(i(t[Rr])){var e=X?"change":"input";t[e]=[].concat(t[Rr],t[e]||[]),delete t[Rr]}i(t[Ir])&&(t.change=[].concat(t[Ir],t.change||[]),delete t[Ir])}(n),ae(n,o,Nr,Pr,e.context),Lr=void 0}}var Dr={create:Mr,update:Mr};function Fr(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,o,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in i(c.__ob__)&&(c=e.data.domProps=S({},c)),s)r(c[n])&&(a[n]="");for(n in c){if(o=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),o===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=o;var u=r(o)?"":String(o);Ur(a,u)&&(a.value=u)}else a[n]=o}}}function Ur(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,r=t._vModifiers;if(i(r)){if(r.lazy)return!1;if(r.number)return d(n)!==d(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var Hr={create:Fr,update:Fr},Br=b(function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach(function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e});function qr(t){var e=Vr(t.style);return t.staticStyle?S(t.staticStyle,e):e}function Vr(t){return Array.isArray(t)?T(t):"string"==typeof t?Br(t):t}var zr,Kr=/^--/,Jr=/\s*!important$/,Wr=function(t,e,n){if(Kr.test(e))t.style.setProperty(e,n);else if(Jr.test(n))t.style.setProperty(e,n.replace(Jr,""),"important");else{var r=Gr(e);if(Array.isArray(n))for(var i=0,o=n.length;i-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function ti(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function ei(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&S(e,ni(t.name||"v")),S(e,t),e}return"string"==typeof t?ni(t):void 0}}var ni=b(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),ri=z&&!G,ii="transition",oi="animation",ai="transition",si="transitionend",ci="animation",ui="animationend";ri&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ai="WebkitTransition",si="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ci="WebkitAnimation",ui="webkitAnimationEnd"));var fi=z?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function li(t){fi(function(){fi(t)})}function pi(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Qr(t,e))}function di(t,e){t._transitionClasses&&y(t._transitionClasses,e),ti(t,e)}function vi(t,e,n){var r=mi(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===ii?si:ui,c=0,u=function(){t.removeEventListener(s,f),n()},f=function(e){e.target===t&&++c>=a&&u()};setTimeout(function(){c0&&(n=ii,f=a,l=o.length):e===oi?u>0&&(n=oi,f=u,l=c.length):l=(n=(f=Math.max(a,u))>0?a>u?ii:oi:null)?n===ii?o.length:c.length:0,{type:n,timeout:f,propCount:l,hasTransform:n===ii&&hi.test(r[ai+"Property"])}}function yi(t,e){for(;t.length1}function xi(t,e){!0!==e.data.show&&_i(e)}var Ci=function(t){var e,n,s={},c=t.modules,u=t.nodeOps;for(e=0;ev?_(t,r(n[y+1])?null:n[y+1].elm,n,d,y,o):d>y&&w(0,e,p,v)}(c,d,v,n,a):i(v)?(i(t.text)&&u.setTextContent(c,""),_(c,null,v,0,v.length-1,n)):i(d)?w(0,d,0,d.length-1):i(t.text)&&u.setTextContent(c,""):t.text!==e.text&&u.setTextContent(c,e.text),i(p)&&i(f=p.hook)&&i(f=f.postpatch)&&f(t,e)}}}function k(t,e,n){if(o(n)&&i(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r-1,a.selected!==o&&(a.selected=o);else if(R(Ti(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function Si(t,e){return e.every(function(e){return!R(e,t)})}function Ti(t){return"_value"in t?t._value:t.value}function Ei(t){t.target.composing=!0}function ji(t){t.target.composing&&(t.target.composing=!1,Li(t.target,"input"))}function Li(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Ri(t){return!t.componentInstance||t.data&&t.data.transition?t:Ri(t.componentInstance._vnode)}var Ii={model:ki,show:{bind:function(t,e,n){var r=e.value,i=(n=Ri(n)).data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&i?(n.data.show=!0,_i(n,function(){t.style.display=o})):t.style.display=r?o:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=Ri(n)).data&&n.data.transition?(n.data.show=!0,r?_i(n,function(){t.style.display=t.__vOriginalDisplay}):bi(n,function(){t.style.display="none"})):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,i){i||(t.style.display=t.__vOriginalDisplay)}}},Ni={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Pi(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Pi(de(e.children)):t}function Mi(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[$(o)]=i[o];return e}function Di(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var Fi={name:"transition",props:Ni,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(function(t){return t.tag||pe(t)})).length){0;var r=this.mode;0;var i=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return i;var o=Pi(i);if(!o)return i;if(this._leaving)return Di(t,i);var s="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?s+"comment":s+o.tag:a(o.key)?0===String(o.key).indexOf(s)?o.key:s+o.key:o.key;var c=(o.data||(o.data={})).transition=Mi(this),u=this._vnode,f=Pi(u);if(o.data.directives&&o.data.directives.some(function(t){return"show"===t.name})&&(o.data.show=!0),f&&f.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(o,f)&&!pe(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=S({},c);if("out-in"===r)return this._leaving=!0,se(l,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),Di(t,i);if("in-out"===r){if(pe(o))return u;var p,d=function(){p()};se(c,"afterEnter",d),se(c,"enterCancelled",d),se(l,"delayLeave",function(t){p=t})}}return i}}},Ui=S({tag:String,moveClass:String},Ni);function Hi(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Bi(t){t.data.newPos=t.elm.getBoundingClientRect()}function qi(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete Ui.mode;var Vi={Transition:Fi,TransitionGroup:{props:Ui,render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Mi(this),s=0;s-1?Dn[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Dn[t]=/HTMLUnknownElement/.test(e.toString())},S(pn.options.directives,Ii),S(pn.options.components,Vi),pn.prototype.__patch__=z?Ci:E,pn.prototype.$mount=function(t,e){return function(t,e,n){return t.$el=e,t.$options.render||(t.$options.render=ht),xe(t,"beforeMount"),new Le(t,function(){t._update(t._render(),n)},E,null,!0),n=!1,null==t.$vnode&&(t._isMounted=!0,xe(t,"mounted")),t}(this,t=t&&z?Un(t):void 0,e)},z&&setTimeout(function(){F.devtools&&rt&&rt.emit("init",pn)},0);var zi=/\{\{((?:.|\n)+?)\}\}/g,Ki=/[-.*+?^${}()|[\]\/\\]/g,Ji=b(function(t){var e=t[0].replace(Ki,"\\$&"),n=t[1].replace(Ki,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")});function Wi(t,e){var n=e?Ji(e):zi;if(n.test(t)){for(var r,i,o,a=[],s=[],c=n.lastIndex=0;r=n.exec(t);){(i=r.index)>c&&(s.push(o=t.slice(c,i)),a.push(JSON.stringify(o)));var u=vr(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,ro="[a-zA-Z_][\\w\\-\\.]*",io="((?:"+ro+"\\:)?"+ro+")",oo=new RegExp("^<"+io),ao=/^\s*(\/?)>/,so=new RegExp("^<\\/"+io+"[^>]*>"),co=/^]+>/i,uo=/^",""":'"',"&":"&"," ":"\n"," ":"\t"},mo=/&(?:lt|gt|quot|amp);/g,yo=/&(?:lt|gt|quot|amp|#10|#9);/g,go=v("pre,textarea",!0),_o=function(t,e){return t&&go(t)&&"\n"===e[0]};function bo(t,e){var n=e?yo:mo;return t.replace(n,function(t){return ho[t]})}var wo,$o,xo,Co,ko,Ao,Oo,So,To=/^@|^v-on:/,Eo=/^v-|^@|^:/,jo=/([^]*?)\s+(?:in|of)\s+([^]*)/,Lo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Ro=/^\(|\)$/g,Io=/:(.*)$/,No=/^:|^v-bind:/,Po=/\.[^.]+/g,Mo=b(Yi);function Do(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:function(t){for(var e={},n=0,r=t.length;n]*>)","i")),p=t.replace(l,function(t,n,r){return u=r.length,po(f)||"noscript"===f||(n=n.replace(//g,"$1").replace(//g,"$1")),_o(f,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});c+=t.length-p.length,t=p,A(f,c-u,c)}else{var d=t.indexOf("<");if(0===d){if(uo.test(t)){var v=t.indexOf("--\x3e");if(v>=0){e.shouldKeepComment&&e.comment(t.substring(4,v)),x(v+3);continue}}if(fo.test(t)){var h=t.indexOf("]>");if(h>=0){x(h+2);continue}}var m=t.match(co);if(m){x(m[0].length);continue}var y=t.match(so);if(y){var g=c;x(y[0].length),A(y[1],g,c);continue}var _=C();if(_){k(_),_o(r,t)&&x(1);continue}}var b=void 0,w=void 0,$=void 0;if(d>=0){for(w=t.slice(d);!(so.test(w)||oo.test(w)||uo.test(w)||fo.test(w)||($=w.indexOf("<",1))<0);)d+=$,w=t.slice(d);b=t.substring(0,d),x(d)}d<0&&(b=t,t=""),e.chars&&b&&e.chars(b)}if(t===n){e.chars&&e.chars(t);break}}function x(e){c+=e,t=t.substring(e)}function C(){var e=t.match(oo);if(e){var n,r,i={tagName:e[1],attrs:[],start:c};for(x(e[0].length);!(n=t.match(ao))&&(r=t.match(no));)x(r[0].length),i.attrs.push(r);if(n)return i.unarySlash=n[1],x(n[0].length),i.end=c,i}}function k(t){var n=t.tagName,c=t.unarySlash;o&&("p"===r&&eo(n)&&A(r),s(n)&&r===n&&A(n));for(var u=a(n)||!!c,f=t.attrs.length,l=new Array(f),p=0;p=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)e.end&&e.end(i[u].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,o):"p"===s&&(e.start&&e.start(t,[],!1,n,o),e.end&&e.end(t,n,o))}A()}(t,{warn:wo,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,start:function(t,o,u){var f=r&&r.ns||So(t);X&&"svg"===f&&(o=function(t){for(var e=[],n=0;n-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),$r(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Ar(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Ar(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Ar(e,"$$c")+"}",null,!0)}(t,r,i);else if("input"===o&&"radio"===a)!function(t,e,n){var r=n&&n.number,i=xr(t,"value")||"null";gr(t,"checked","_q("+e+","+(i=r?"_n("+i+")":i)+")"),$r(t,"change",Ar(e,i),null,!0)}(t,r,i);else if("input"===o||"textarea"===o)!function(t,e,n){var r=t.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?Rr:"input",f="$event.target.value";s&&(f="$event.target.value.trim()"),a&&(f="_n("+f+")");var l=Ar(e,f);c&&(l="if($event.target.composing)return;"+l),gr(t,"value","("+e+")"),$r(t,u,l,null,!0),(s||a)&&$r(t,"blur","$forceUpdate()")}(t,r,i);else if(!F.isReservedTag(o))return kr(t,r,i),!1;return!0},text:function(t,e){e.value&&gr(t,"textContent","_s("+e.value+")")},html:function(t,e){e.value&&gr(t,"innerHTML","_s("+e.value+")")}},isPreTag:function(t){return"pre"===t},isUnaryTag:Qi,mustUseProp:$n,canBeLeftOpenTag:to,isReservedTag:Pn,getTagNamespace:Mn,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(Jo)},Zo=b(function(t){return v("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(t?","+t:""))});function Yo(t,e){t&&(Wo=Zo(e.staticKeys||""),Xo=e.isReservedTag||j,function t(e){e.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||h(t.tag)||!Xo(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Wo)))}(e);if(1===e.type){if(!Xo(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var n=0,r=e.children.length;n|^function\s*\(/,ta=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ea={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},na={esc:"Escape",tab:"Tab",enter:"Enter",space:" ",up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete"]},ra=function(t){return"if("+t+")return null;"},ia={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:ra("$event.target !== $event.currentTarget"),ctrl:ra("!$event.ctrlKey"),shift:ra("!$event.shiftKey"),alt:ra("!$event.altKey"),meta:ra("!$event.metaKey"),left:ra("'button' in $event && $event.button !== 0"),middle:ra("'button' in $event && $event.button !== 1"),right:ra("'button' in $event && $event.button !== 2")};function oa(t,e,n){var r=e?"nativeOn:{":"on:{";for(var i in t)r+='"'+i+'":'+aa(i,t[i])+",";return r.slice(0,-1)+"}"}function aa(t,e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return aa(t,e)}).join(",")+"]";var n=ta.test(e.value),r=Qo.test(e.value);if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(ia[s])o+=ia[s],ea[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=ra(["ctrl","shift","alt","meta"].filter(function(t){return!c[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=function(t){return"if(!('button' in $event)&&"+t.map(sa).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(n?"return "+e.value+"($event)":r?"return ("+e.value+")($event)":e.value)+"}"}return n||r?e.value:"function($event){"+e.value+"}"}function sa(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=ea[t],r=na[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var ca={on:function(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}},bind:function(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}},cloak:E},ua=function(t){this.options=t,this.warn=t.warn||mr,this.transforms=yr(t.modules,"transformCode"),this.dataGenFns=yr(t.modules,"genData"),this.directives=S(S({},ca),t.directives);var e=t.isReservedTag||j;this.maybeComponent=function(t){return!e(t.tag)},this.onceId=0,this.staticRenderFns=[]};function fa(t,e){var n=new ua(e);return{render:"with(this){return "+(t?la(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function la(t,e){if(t.staticRoot&&!t.staticProcessed)return pa(t,e);if(t.once&&!t.onceProcessed)return da(t,e);if(t.for&&!t.forProcessed)return function(t,e,n,r){var i=t.for,o=t.alias,a=t.iterator1?","+t.iterator1:"",s=t.iterator2?","+t.iterator2:"";0;return t.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||la)(t,e)+"})"}(t,e);if(t.if&&!t.ifProcessed)return va(t,e);if("template"!==t.tag||t.slotTarget){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=ya(t,e),i="_t("+n+(r?","+r:""),o=t.attrs&&"{"+t.attrs.map(function(t){return $(t.name)+":"+t.value}).join(",")+"}",a=t.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(t,e);var n;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:ya(e,n,!0);return"_c("+t+","+ha(e,n)+(r?","+r:"")+")"}(t.component,t,e);else{var r=t.plain?void 0:ha(t,e),i=t.inlineTemplate?null:ya(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o':'
',Ca.innerHTML.indexOf(" ")>0}var Oa=!!z&&Aa(!1),Sa=!!z&&Aa(!0),Ta=b(function(t){var e=Un(t);return e&&e.innerHTML}),Ea=pn.prototype.$mount;pn.prototype.$mount=function(t,e){if((t=t&&Un(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=Ta(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){0;var i=ka(r,{shouldDecodeNewlines:Oa,shouldDecodeNewlinesForHref:Sa,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return Ea.call(this,t,e)},pn.compile=ka,e.a=pn}).call(e,n("DuR2"))},DuR2:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},"VU/8":function(t,e){t.exports=function(t,e,n,r,i,o){var a,s=t=t||{},c=typeof t.default;"object"!==c&&"function"!==c||(a=t,s=t.default);var u,f="function"==typeof s?s.options:s;if(e&&(f.render=e.render,f.staticRenderFns=e.staticRenderFns,f._compiled=!0),n&&(f.functional=!0),i&&(f._scopeId=i),o?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},f._ssrRegister=u):r&&(u=r),u){var l=f.functional,p=l?f.render:f.beforeCreate;l?(f._injectStyles=u,f.render=function(t,e){return u.call(e),p(t,e)}):f.beforeCreate=p?[].concat(p,u):[u]}return{esModule:a,exports:s,options:f}}}}); 13 | //# sourceMappingURL=vendor.7fed9fa7b7ba482410b7.js.map --------------------------------------------------------------------------------