Skip to content

Commit

Permalink
release -v 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ccxm committed Apr 6, 2020
1 parent 2e12e31 commit e376f5c
Show file tree
Hide file tree
Showing 186 changed files with 15,396 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> 1%
last 2 versions
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
27 changes: 27 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'@vue/standard'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-trailing-spaces': ["error", {"skipBlankLines": true}],
'space-before-function-paren': ['error', 'never'],
'indent': 'off',
'vue/script-indent': [
'error',
4,
{
'baseIndent': 1
}
]
},
parserOptions: {
parser: 'babel-eslint'
}
}
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.DS_Store
node_modules
/dist
/bu


# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
13 changes: 13 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
presets: [
'@vue/app'
],
plugins: [
[
'@babel/plugin-transform-modules-commonjs',
{
allowTopLevelThis: true,
},
]
]
}
34 changes: 34 additions & 0 deletions console.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* 重写console.log方法
* 通过设置isLog来控制是否输出日志
* 对于object,array引用类型已进行深拷贝,确保打印出的值是执行时的值
* 重写后在整个程序的生命周期都有效,在程序的所有地方都可以调用
* 可在程序的第一行就调用,确保后续的console.log改写后的
* 如:vue在main.js中引入,小程序可在app.js第一行引入
* dev: isLog = true
* prod: isLog = false
* console.trace()为打印程序调用的堆栈,因为改写后打印的值是在改写后的堆栈中
* 如果觉得太长可设置isLogStack = false
*/

console.log = (function (logFunc, isLog = true, isLogStack = false) {
return function () {
if (!isLog) {
return
}
try {
let arr = []
arr.push(...arguments)
arr.forEach((item, index) => {
if (Object.prototype.toString.call(item) === '[object Object]' ||
Object.prototype.toString.call(item) === '[object Array]') {
arr[index] = JSON.parse(JSON.stringify(item))
}
})
logFunc.call(console, ...arr)
isLogStack ? console.trace() : null
} catch (e) {
console.log(`a log error: ${e}`)
}
}
})(console.log)
34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "cat-mall",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"btoa": "^1.2.1",
"btoa-atob": "^0.1.2",
"core-js": "^2.6.5",
"element-china-area-data": "^4.1.2",
"element-ui": "^2.13.0",
"vue": "^2.6.10",
"vue-infinite-scroll": "^2.0.2",
"vue-router": "^3.0.3",
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.11.0",
"@vue/cli-plugin-eslint": "^3.11.0",
"@vue/cli-service": "^3.11.0",
"@vue/eslint-config-standard": "^4.0.0",
"axios": "^0.19.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"sass": "^1.18.0",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.6.10"
}
}
5 changes: 5 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}
Binary file added public/audio/cat-01.mp3
Binary file not shown.
Loading

0 comments on commit e376f5c

Please sign in to comment.