@ -0,0 +1,8 @@ |
|||||
|
[*.{js,jsx,ts,tsx,vue}] |
||||
|
indent_style = space |
||||
|
indent_size = 2 |
||||
|
end_of_line = lf |
||||
|
trim_trailing_whitespace = true |
||||
|
insert_final_newline = true |
||||
|
max_line_length = 140 |
||||
|
root = true |
@ -0,0 +1 @@ |
|||||
|
[{"/mnt/c/Users/Administrator/Documents/coding/ccsens/tall-mui-cli/commitlint.config.js":"1","/mnt/c/Users/Administrator/Documents/coding/ccsens/tall-mui-cli/src/main.js":"2","/mnt/c/Users/Administrator/Documents/coding/ccsens/tall-mui-cli/src/registerServiceWorker.js":"3","/mnt/c/Users/Administrator/Documents/coding/ccsens/tall-mui-cli/tailwind.config.js":"4","/mnt/c/Users/Administrator/Documents/coding/ccsens/tall-mui-cli/vue.config.js":"5"},{"size":85,"mtime":1623918227177,"results":"6","hashOfConfig":"7"},{"size":222,"mtime":1623973598320,"results":"8","hashOfConfig":"7"},{"size":882,"mtime":1623918165160,"results":"9","hashOfConfig":"7"},{"size":160,"mtime":1623973181665},{"size":398,"mtime":1623918227183,"results":"10","hashOfConfig":"7"},{"filePath":"11","messages":"12","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"ssjk3q",{"filePath":"13","messages":"14","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"15","messages":"16","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"17","messages":"18","errorCount":2,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/mnt/c/Users/Administrator/Documents/coding/ccsens/tall-mui-cli/commitlint.config.js",[],"/mnt/c/Users/Administrator/Documents/coding/ccsens/tall-mui-cli/src/main.js",[],"/mnt/c/Users/Administrator/Documents/coding/ccsens/tall-mui-cli/src/registerServiceWorker.js",[],"/mnt/c/Users/Administrator/Documents/coding/ccsens/tall-mui-cli/vue.config.js",["19","20"],{"ruleId":"21","severity":2,"message":"22","line":1,"column":7,"nodeType":"23","endLine":1,"endColumn":11},{"ruleId":"21","severity":2,"message":"24","line":2,"column":7,"nodeType":"23","endLine":2,"endColumn":24},"no-unused-vars","'path' is assigned a value but never used.","Identifier","'CopyWebpackPlugin' is assigned a value but never used."] |
@ -0,0 +1,11 @@ |
|||||
|
node_modules |
||||
|
dist/ |
||||
|
test |
||||
|
build/ |
||||
|
unpackage/ |
||||
|
babel.config.js |
||||
|
package.json |
||||
|
postcss.config.js |
||||
|
.eslint.js |
||||
|
vue.config.js |
||||
|
src/common/styles/index.css |
@ -0,0 +1,40 @@ |
|||||
|
module.exports = { |
||||
|
root: true, |
||||
|
env: { |
||||
|
node: true, |
||||
|
browser: true, |
||||
|
}, |
||||
|
extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/prettier'], |
||||
|
rules: { |
||||
|
'vue/html-self-closing': 'off', |
||||
|
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
||||
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
||||
|
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsFor: ['state'] }], |
||||
|
'max-len': ['error', { code: 140, tabWidth: 2 }], |
||||
|
'object-curly-newline': ['error', { multiline: true }], |
||||
|
'arrow-parens': ['error', 'as-needed'], |
||||
|
'linebreak-style': 'off', |
||||
|
'vue/attributes-order': 'off', |
||||
|
'vue/singleline-html-element-content-newline': 'off', |
||||
|
'vue/max-attributes-per-line': 'off', |
||||
|
'vue/multiline-html-element-content-newline': 'off', |
||||
|
'vue/html-indent': 'off', |
||||
|
}, |
||||
|
|
||||
|
parserOptions: { parser: 'babel-eslint' }, |
||||
|
|
||||
|
overrides: [ |
||||
|
{ |
||||
|
files: ['**/__tests__/*.{j,t}s?(x)'], |
||||
|
env: { jest: true }, |
||||
|
}, |
||||
|
], |
||||
|
|
||||
|
globals: { |
||||
|
Vue: true, |
||||
|
VueRouter: true, |
||||
|
Vuex: true, |
||||
|
axios: true, |
||||
|
_: true, |
||||
|
}, |
||||
|
}; |
@ -0,0 +1,9 @@ |
|||||
|
node_modules |
||||
|
dist/ |
||||
|
test |
||||
|
build/ |
||||
|
unpackage/ |
||||
|
babel.config.js |
||||
|
package.json |
||||
|
postcss.config.js |
||||
|
.eslint.js |
@ -0,0 +1,13 @@ |
|||||
|
{ |
||||
|
"printWidth": 140, |
||||
|
"singleQuote": true, |
||||
|
"semi": true, |
||||
|
"trailingComma": "all", |
||||
|
"arrowParens": "avoid", |
||||
|
"tabWidth": 2, |
||||
|
"useTabs": false, |
||||
|
"bracketSpacing": true, |
||||
|
"jsxBracketSameLine": false, |
||||
|
"proseWrap": "always", |
||||
|
"endOfLine": "lf" |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
# 0.1.0 (2021-06-18) |
||||
|
|
||||
|
范围|描述|commitId |
||||
|
--|--|-- |
||||
|
- | init | [c0f1deb](https://gitee.com/mongos/uni-cli-template/commits/c0f1deb) |
||||
|
|
@ -1,63 +1,57 @@ |
|||||
const plugins = [] |
const plugins = []; |
||||
|
|
||||
if (process.env.UNI_OPT_TREESHAKINGNG) { |
if (process.env.UNI_OPT_TREESHAKINGNG) { |
||||
plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js')) |
plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js')); |
||||
} |
} |
||||
|
|
||||
if ( |
if ( |
||||
( |
(process.env.UNI_PLATFORM === 'app-plus' && process.env.UNI_USING_V8) || |
||||
process.env.UNI_PLATFORM === 'app-plus' && |
(process.env.UNI_PLATFORM === 'h5' && process.env.UNI_H5_BROWSER === 'builtin') |
||||
process.env.UNI_USING_V8 |
|
||||
) || |
|
||||
( |
|
||||
process.env.UNI_PLATFORM === 'h5' && |
|
||||
process.env.UNI_H5_BROWSER === 'builtin' |
|
||||
) |
|
||||
) { |
) { |
||||
const path = require('path') |
const path = require('path'); |
||||
|
|
||||
const isWin = /^win/.test(process.platform) |
const isWin = /^win/.test(process.platform); |
||||
|
|
||||
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path) |
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path); |
||||
|
|
||||
const input = normalizePath(process.env.UNI_INPUT_DIR) |
const input = normalizePath(process.env.UNI_INPUT_DIR); |
||||
try { |
try { |
||||
plugins.push([ |
plugins.push([ |
||||
require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'), |
require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'), |
||||
{ |
{ |
||||
file (file) { |
file(file) { |
||||
file = normalizePath(file) |
file = normalizePath(file); |
||||
if (file.indexOf(input) === 0) { |
if (file.indexOf(input) === 0) { |
||||
return path.relative(input, file) |
return path.relative(input, file); |
||||
} |
} |
||||
return false |
return false; |
||||
} |
}, |
||||
} |
}, |
||||
]) |
]); |
||||
} catch (e) {} |
} catch (e) {} |
||||
} |
} |
||||
|
|
||||
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui'] |
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']; |
||||
process.UNI_LIBRARIES.forEach(libraryName => { |
process.UNI_LIBRARIES.forEach(libraryName => { |
||||
plugins.push([ |
plugins.push([ |
||||
'import', |
'import', |
||||
{ |
{ |
||||
'libraryName': libraryName, |
libraryName: libraryName, |
||||
'customName': (name) => { |
customName: name => { |
||||
return `${libraryName}/lib/${name}/${name}` |
return `${libraryName}/lib/${name}/${name}`; |
||||
} |
}, |
||||
} |
}, |
||||
]) |
]); |
||||
}) |
}); |
||||
module.exports = { |
module.exports = { |
||||
presets: [ |
presets: [ |
||||
[ |
[ |
||||
'@vue/app', |
'@vue/app', |
||||
{ |
{ |
||||
modules: 'commonjs', |
modules: 'commonjs', |
||||
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry' |
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry', |
||||
} |
}, |
||||
] |
|
||||
], |
], |
||||
plugins |
], |
||||
} |
plugins, |
||||
|
}; |
||||
|
@ -0,0 +1 @@ |
|||||
|
module.exports = { extends: ['./node_modules/vue-cli-plugin-commitlint/lib/lint'] }; |
@ -1,22 +1,22 @@ |
|||||
const path = require('path') |
const path = require('path'); |
||||
|
|
||||
module.exports = { |
module.exports = { |
||||
parser: require('postcss-comment'), |
parser: require('postcss-comment'), |
||||
plugins: [ |
plugins: [ |
||||
require('postcss-import')({ |
require('postcss-import')({ |
||||
resolve (id, basedir, importOptions) { |
resolve(id, basedir, importOptions) { |
||||
if (id.startsWith('~@/')) { |
if (id.startsWith('~@/')) { |
||||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3)) |
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3)); |
||||
} else if (id.startsWith('@/')) { |
} else if (id.startsWith('@/')) { |
||||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2)) |
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2)); |
||||
} else if (id.startsWith('/') && !id.startsWith('//')) { |
} else if (id.startsWith('/') && !id.startsWith('//')) { |
||||
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1)) |
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1)); |
||||
} |
} |
||||
return id |
return id; |
||||
} |
}, |
||||
}), |
|
||||
require('autoprefixer')({ |
|
||||
remove: process.env.UNI_PLATFORM !== 'h5' |
|
||||
}), |
}), |
||||
require('@dcloudio/vue-cli-plugin-uni/packages/postcss') |
require('autoprefixer')({ remove: process.env.UNI_PLATFORM !== 'h5' }), |
||||
] |
require('@dcloudio/vue-cli-plugin-uni/packages/postcss'), |
||||
} |
require('tailwindcss')({}), |
||||
|
], |
||||
|
}; |
||||
|
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 799 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 215 B |
@ -0,0 +1,2 @@ |
|||||
|
User-agent: * |
||||
|
Disallow: |
@ -1,17 +1,17 @@ |
|||||
<script> |
<script> |
||||
export default { |
export default { |
||||
onLaunch: function() { |
onLaunch: function () { |
||||
console.log('App Launch') |
console.log('App Launch'); |
||||
}, |
}, |
||||
onShow: function() { |
onShow: function () { |
||||
console.log('App Show') |
console.log('App Show'); |
||||
}, |
}, |
||||
onHide: function() { |
onHide: function () { |
||||
console.log('App Hide') |
console.log('App Hide'); |
||||
} |
}, |
||||
} |
}; |
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style> |
||||
/*每个页面公共css */ |
/*每个页面公共css */ |
||||
</style> |
</style> |
||||
|
@ -0,0 +1,5 @@ |
|||||
|
/* ./src/common/src/index.css */ |
||||
|
|
||||
|
@tailwind base; |
||||
|
@tailwind components; |
||||
|
@tailwind utilities; |
@ -1,11 +1,11 @@ |
|||||
import Vue from 'vue' |
import Vue from 'vue'; |
||||
import App from './App' |
import App from './App'; |
||||
|
import './common/styles/index.css'; |
||||
|
import './registerServiceWorker'; |
||||
|
|
||||
Vue.config.productionTip = false |
Vue.config.productionTip = false; |
||||
|
|
||||
App.mpType = 'app' |
App.mpType = 'app'; |
||||
|
|
||||
const app = new Vue({ |
const app = new Vue({ ...App }); |
||||
...App |
app.$mount(); |
||||
}) |
|
||||
app.$mount() |
|
||||
|
@ -1,49 +1,24 @@ |
|||||
<template> |
<template> |
||||
<view class="content"> |
<view class="container p-4"> |
||||
<image class="logo" src="/static/logo.png"></image> |
<image class="avatar" src="/static/logo.png"></image> |
||||
<view> |
<view> |
||||
<text class="title">{{title}}</text> |
<text class="title">{{ title }}</text> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
export default { |
export default { |
||||
data() { |
data() { |
||||
return { |
return { title: 'Hello' }; |
||||
title: 'Hello' |
|
||||
} |
|
||||
}, |
}, |
||||
onLoad() { |
onLoad() {}, |
||||
|
methods: {}, |
||||
}, |
}; |
||||
methods: { |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
</script> |
</script> |
||||
|
|
||||
<style> |
<style lang="scss"> |
||||
.content { |
.title { |
||||
display: flex; |
font-size: 20px; |
||||
flex-direction: column; |
} |
||||
align-items: center; |
|
||||
justify-content: center; |
|
||||
} |
|
||||
|
|
||||
.logo { |
|
||||
height: 200rpx; |
|
||||
width: 200rpx; |
|
||||
margin: 200rpx auto 50rpx auto; |
|
||||
} |
|
||||
|
|
||||
.text-area { |
|
||||
display: flex; |
|
||||
justify-content: center; |
|
||||
} |
|
||||
|
|
||||
.title { |
|
||||
font-size: 36rpx; |
|
||||
color: #8f8f94; |
|
||||
} |
|
||||
</style> |
</style> |
||||
|
@ -0,0 +1,29 @@ |
|||||
|
/* eslint-disable no-console */ |
||||
|
|
||||
|
import { register } from 'register-service-worker'; |
||||
|
|
||||
|
if (process.env.NODE_ENV === 'production') { |
||||
|
register(`${process.env.BASE_URL}service-worker.js`, { |
||||
|
ready() { |
||||
|
console.log('App is being served from cache by a service worker.\n' + 'For more details, visit https://goo.gl/AFskqB'); |
||||
|
}, |
||||
|
registered() { |
||||
|
console.log('Service worker has been registered.'); |
||||
|
}, |
||||
|
cached() { |
||||
|
console.log('Content has been cached for offline use.'); |
||||
|
}, |
||||
|
updatefound() { |
||||
|
console.log('New content is downloading.'); |
||||
|
}, |
||||
|
updated() { |
||||
|
console.log('New content is available; please refresh.'); |
||||
|
}, |
||||
|
offline() { |
||||
|
console.log('No internet connection found. App is running in offline mode.'); |
||||
|
}, |
||||
|
error(error) { |
||||
|
console.error('Error during service worker registration:', error); |
||||
|
}, |
||||
|
}); |
||||
|
} |
@ -0,0 +1,7 @@ |
|||||
|
module.exports = { |
||||
|
purge: [], |
||||
|
darkMode: false, // or 'media' or 'class'
|
||||
|
theme: { extend: {} }, |
||||
|
variants: { extend: {} }, |
||||
|
plugins: [], |
||||
|
}; |
@ -0,0 +1,13 @@ |
|||||
|
const path = require('path'); |
||||
|
const CopyWebpackPlugin = require('copy-webpack-plugin'); //最新版本copy-webpack-plugin插件暂不兼容,推荐v5.0.0
|
||||
|
|
||||
|
module.exports = { |
||||
|
lintOnSave: process.env.NODE_ENV !== 'production', |
||||
|
productionSourceMap: false, |
||||
|
devServer: { |
||||
|
open: true, |
||||
|
overlay: { warnings: true, errors: true }, |
||||
|
// proxy: {}
|
||||
|
}, |
||||
|
configureWebpack: { plugins: [] }, |
||||
|
}; |