Skip to content

Commit

Permalink
feat: 添加删除console.log 功能
Browse files Browse the repository at this point in the history
  • Loading branch information
fengc-c authored and fengc-c committed Jul 12, 2020
1 parent 15a2b4f commit 7fc9ba7
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 42 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
},
"dependencies": {
"axios": "^0.19.2",
"babel-plugin-transform-remove-console": "^6.9.4",
"core-js": "^3.6.5",
"dayjs": "^1.8.28",
"vant": "^2.8.6",
Expand All @@ -36,6 +35,7 @@
"babel-plugin-jsx-v-model": "^2.0.3",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"compression-webpack-plugin": "^4.0.0",
"eslint": "^6.7.2",
Expand All @@ -59,7 +59,8 @@
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
Expand Down
80 changes: 40 additions & 40 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
import Vue from 'vue'

// 用于控制浏览器前进后退 使用keep-alive
import Navigation from 'vue-navigation'

import FastClick from 'fastclick'

import App from './App.vue'
import store from './store'
import router from './router'

// 安装基础组件 与自定义组件
import BaseComponent from './base'
import CustomComponent from './components'

Vue.use(BaseComponent, {})
Vue.use(CustomComponent, {})

Vue.config.productionTip = false

// 处理点击事件延迟300ms问题
FastClick.attach(document.body)

// 用于控制浏览器前进后退缓存
Vue.use(Navigation, {
router,
store
})

// 开发环境下面使用vConsole进行调试
if (process.env.NODE_ENV === 'development') {
const VConsole = require('vconsole')
new VConsole()
}

new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
import Vue from 'vue'

// 用于控制浏览器前进后退 使用keep-alive
import Navigation from 'vue-navigation'

import FastClick from 'fastclick'

import App from './App.vue'
import store from './store'
import router from './router'

// 安装基础组件 与自定义组件
import BaseComponent from './base'
import CustomComponent from './components'

Vue.use(BaseComponent, {})
Vue.use(CustomComponent, {})

Vue.config.productionTip = false

// 处理点击事件延迟300ms问题
FastClick.attach(document.body)

// 用于控制浏览器前进后退缓存
Vue.use(Navigation, {
router,
store
})

// 开发环境下面使用vConsole进行调试
if (process.env.NODE_ENV === 'development') {
const VConsole = require('vconsole')
new VConsole()
}

new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')

0 comments on commit 7fc9ba7

Please sign in to comment.