Преглед на файлове

:fire: Removing code or files.remove unnecessary dependencies

lishangbu преди 6 години
родител
ревизия
f7c771ebd2
променени са 5 файла, в които са добавени 11 реда и са изтрити 42 реда
  1. 2 15
      package.json
  2. 2 6
      src/main.js
  3. 0 8
      tests/unit/.eslintrc.js
  4. 0 13
      tests/unit/HelloWorld.spec.js
  5. 7 0
      vue.config.js

+ 2 - 15
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pigx-ui",
-  "version": "1.8.0",
+  "version": "2.1.0",
   "private": true,
   "scripts": {
     "pre": "yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ",
@@ -12,37 +12,24 @@
   "dependencies": {
     "@smallwei/avue": "^1.5.0",
     "avue-plugin-transfer": "^0.0.2",
-    "avue-plugin-ueditor": "^0.0.1",
     "axios": "^0.18.0",
-    "babel-loader": "^8.0.2",
-    "babel-plugin-transform-runtime": "^6.23.0",
     "babel-polyfill": "^6.26.0",
     "classlist-polyfill": "^1.2.0",
-    "driver.js": "^0.6.2",
     "element-ui": "^2.4.11",
-    "file-saver": "^1.3.8",
-    "html2canvas": "^1.0.0-alpha.12",
     "js-cookie": "^2.2.0",
-    "moment": "^2.22.2",
     "nprogress": "^0.2.0",
     "script-loader": "^0.7.2",
     "vue": "^2.5.16",
     "vue-axios": "^2.1.2",
-    "vue-clipboard2": "^0.2.1",
     "vue-json-editor": "^1.2.3",
     "vue-json-tree-view": "^2.1.4",
-    "vue-quill-editor": "^3.0.6",
     "vue-router": "^3.0.2",
-    "vuedraggable": "^2.17.0",
-    "vuex": "^3.0.1",
-    "xlsx": "^0.13.3"
+    "vuex": "^3.0.1"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "^3.1.1",
     "@vue/cli-plugin-eslint": "^3.1.5",
-    "@vue/cli-plugin-unit-mocha": "^3.1.1",
     "@vue/cli-service": "^3.1.4",
-    "@vue/test-utils": "^1.0.0-beta.26",
     "chai": "^4.1.2",
     "node-sass": "^4.9.0",
     "sass-loader": "^7.0.1",

+ 2 - 6
src/main.js

@@ -8,19 +8,17 @@ import './permission' // 权限
 import './error' // 日志
 import router from './router/router'
 import 'avue-plugin-transfer/packages' // 引入avue-plugin-transfer插件
-// import 'avue-plugin-ueditor/packages' //引入avue-plugin-ueditor插件(如果要兼容ie自行换掉富文本编辑器,此款插件不兼容ie)
 import store from './store'
 import { loadStyle } from './util/util'
 import * as urls from '@/config/env'
 import { iconfontUrl, iconfontVersion } from '@/config/env'
 import * as filters from './filters' // 全局filter
 import './styles/common.scss'
-// // 引入avue的包
+// 引入avue的包
 import Avue from '@smallwei/avue/lib/index.js'
-// // 引入avue的样式文件
+// 引入avue的样式文件
 import '@smallwei/avue/lib/theme-chalk/index.css'
 import basicContainer from './components/basic-container/main'
-import VueClipboard from 'vue-clipboard2'
 // 插件 json 展示
 import vueJsonTreeView from 'vue-json-tree-view'
 
@@ -32,8 +30,6 @@ Vue.use(Avue, { menuType: 'text' })
 
 Vue.use(router)
 
-Vue.use(VueClipboard)
-
 Vue.use(vueJsonTreeView)
 
 Vue.use(VueAxios, axios)

+ 0 - 8
tests/unit/.eslintrc.js

@@ -1,8 +0,0 @@
-module.exports = {
-  env: {
-    mocha: true
-  },
-  rules: {
-    'import/no-extraneous-dependencies': 'off'
-  }
-}

+ 0 - 13
tests/unit/HelloWorld.spec.js

@@ -1,13 +0,0 @@
-import { expect } from 'chai'
-import { shallowMount } from '@vue/test-utils'
-import HelloWorld from '@/components/HelloWorld.vue'
-
-describe('HelloWorld.vue', () => {
-  it('renders props.msg when passed', () => {
-    const msg = 'new message'
-    const wrapper = shallowMount(HelloWorld, {
-      propsData: { msg }
-    })
-    expect(wrapper.text()).to.include(msg)
-  })
-})

+ 7 - 0
vue.config.js

@@ -11,6 +11,13 @@ module.exports = {
       'axios': 'axios',
       'element-ui': 'ELEMENT'
     })
+    const entry = config.entry('app')
+    entry
+      .add('babel-polyfill')
+      .end()
+    entry
+      .add('classlist-polyfill')
+      .end()
   },
   transpileDependencies: ['avue-plugin-transfer', 'avue-plugin-ueditor'],
   // 配置转发代理