From 8ff8a77ac97d8262d1f22c5e8a0f13ea9f30522b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=AD=E4=BC=9F=E8=81=AA?= Date: Sat, 9 Feb 2019 17:09:58 +0800 Subject: [PATCH] [*] update view configuration --- view/.babelrc | 28 +- view/package.json | 74 +- view/src/app.js | 1 + view/{ => src}/index.ejs | 0 view/src/pages/List.vue | 4 +- view/webpack.config.js | 97 +- view/yarn.lock | 6829 ++++++++++++++++++++++++++++++++++++++ 7 files changed, 6946 insertions(+), 87 deletions(-) rename view/{ => src}/index.ejs (100%) create mode 100644 view/yarn.lock diff --git a/view/.babelrc b/view/.babelrc index f92caaf..d227a27 100644 --- a/view/.babelrc +++ b/view/.babelrc @@ -1,12 +1,30 @@ { - "presets": ["env", "stage-1"], + "presets": ["@babel/env"], "plugins": [ + "@babel/plugin-syntax-dynamic-import", + "@babel/plugin-syntax-import-meta", + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-json-strings", [ - "component", + "@babel/plugin-proposal-decorators", { - "libraryName": "element-ui", - "styleLibraryName": "theme-chalk" + "legacy": true } - ] + ], + "@babel/plugin-proposal-function-sent", + "@babel/plugin-proposal-export-namespace-from", + "@babel/plugin-proposal-numeric-separator", + "@babel/plugin-proposal-throw-expressions", + "@babel/plugin-proposal-export-default-from", + "@babel/plugin-proposal-logical-assignment-operators", + "@babel/plugin-proposal-optional-chaining", + [ + "@babel/plugin-proposal-pipeline-operator", + { + "proposal": "minimal" + } + ], + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-do-expressions" ] } diff --git a/view/package.json b/view/package.json index 6ae80ca..2b31aaa 100644 --- a/view/package.json +++ b/view/package.json @@ -4,9 +4,8 @@ "description": "FrontEnd of IMG Hosting System.", "main": "./src/app.js", "scripts": { - "clean": "rimraf ./dist", - "dev": "npm run clean & webpack-dev-server --open", - "build": "npm run clean & cross-env NODE_ENV=production webpack --progress" + "dev": "webpack-dev-server --open", + "build": "cross-env NODE_ENV=production webpack --progress" }, "keywords": [ "Vue" @@ -14,39 +13,54 @@ "author": "pwcong@foxmail.com", "license": "ISC", "devDependencies": { - "babel-core": "^6.26.0", - "babel-loader": "^7.1.2", - "babel-plugin-component": "^1.1.0", - "babel-polyfill": "^6.26.0", - "babel-preset-env": "^1.6.0", - "babel-preset-stage-1": "^6.24.1", - "css-loader": "^0.28.7", - "extract-text-webpack-plugin": "^3.0.0", - "file-loader": "^0.11.2", - "html-webpack-plugin": "^2.30.1", - "node-sass": "^4.5.3", - "postcss-cssnext": "^3.0.2", - "sass-loader": "^6.0.6", - "style-loader": "^0.19.0", - "url-loader": "^1.0.1", - "vue-loader": "^13.3.0", - "vue-template-compiler": "^2.5.2", - "webpack": "^3.8.1", - "webpack-dev-server": "^2.9.3" + "@babel/core": "^7.2.2", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-decorators": "^7.0.0", + "@babel/plugin-proposal-do-expressions": "^7.0.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-export-namespace-from": "^7.0.0", + "@babel/plugin-proposal-function-sent": "^7.0.0", + "@babel/plugin-proposal-json-strings": "^7.0.0", + "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-proposal-numeric-separator": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.0.0", + "@babel/plugin-proposal-pipeline-operator": "^7.0.0", + "@babel/plugin-proposal-throw-expressions": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-import-meta": "^7.0.0", + "@babel/polyfill": "^7.2.5", + "@babel/preset-env": "^7.2.3", + "babel-loader": "^8.0.5", + "clean-webpack-plugin": "^1.0.1", + "css-loader": "^2.1.0", + "file-loader": "^3.0.1", + "html-webpack-plugin": "^3.2.0", + "mini-css-extract-plugin": "^0.5.0", + "node-sass": "^4.9.0", + "postcss-loader": "^2.1.5", + "postcss-preset-env": "^6.2.0", + "sass-loader": "^7.0.1", + "url-loader": "^1.1.2", + "vue-loader": "^15.2.1", + "vue-style-loader": "^4.1.2", + "vue-template-compiler": "^2.6.4", + "webpack": "^4.29.3", + "webpack-cli": "^3.2.3", + "webpack-dev-server": "^3.1.14" }, "dependencies": { - "axios": "^0.17.0", + "axios": "^0.18.0", "chance": "^1.0.13", "clipboard": "^2.0.0", - "cross-env": "^5.1.0", - "element-ui": "^2.2.2", + "cross-env": "^5.2.0", + "dayjs": "^1.8.5", + "element-ui": "^2.5.4", "js-cookie": "^2.2.0", "marked": "^0.3.17", - "moment": "^2.21.0", "normalize.css": "^8.0.0", - "rimraf": "^2.6.2", - "vue": "^2.5.3", - "vue-router": "^3.0.1", - "vuex": "^3.0.0" + "vue": "^2.6.4", + "vue-router": "^3.0.2", + "vuex": "^3.1.0" } } diff --git a/view/src/app.js b/view/src/app.js index 9bf2809..755e780 100644 --- a/view/src/app.js +++ b/view/src/app.js @@ -1,6 +1,7 @@ import Vue from 'vue'; import { Message, MessageBox, Icon, Pagination, Card, Dialog } from 'element-ui'; +import 'element-ui/lib/theme-chalk/index.css'; Vue.use(Icon); Vue.use(Pagination); diff --git a/view/index.ejs b/view/src/index.ejs similarity index 100% rename from view/index.ejs rename to view/src/index.ejs diff --git a/view/src/pages/List.vue b/view/src/pages/List.vue index 6c1dea3..ba28339 100644 --- a/view/src/pages/List.vue +++ b/view/src/pages/List.vue @@ -143,7 +143,7 @@