Skip to content

Commit 90087bc

Browse files
committed
初始化:cli项目
1 parent a9758b9 commit 90087bc

File tree

317 files changed

+605
-17361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+605
-17361
lines changed

.env.development

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# just a flag
2+
ENV = 'development'
3+
4+
# base api
5+
VUE_APP_BASE_API = ''

.env.production

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# just a flag
2+
ENV = 'production'
3+
4+
# base api
5+
VUE_APP_BASE_API = ''

.eslintignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
unpackage
2-
node_modules
3-
uview-ui
1+
src/unpackage
2+
src/node_modules
3+
src/uview-ui

.gitignore

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
1-
/unpackage/dist/*
2-
/node_modules/*
3-
/.idea/*
4-
deploy.sh
1+
.DS_Store
2+
node_modules/
3+
unpackage/
4+
dist/
5+
6+
# local env files
7+
.env.local
8+
.env.*.local
9+
10+
# Log files
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
15+
# Editor directories and files
16+
.project
17+
.idea
18+
.vscode
19+
*.suo
20+
*.ntvs*
21+
*.njsproj
22+
*.sln
23+
*.sw*
24+
25+
package-lock.json

App.vue

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 10 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,19 @@
1-
<p align="center">
2-
<img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
3-
</p>
4-
<h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView</h3>
5-
<h3 align="center">多平台快速开发的UI框架</h3>
1+
# uview-cli
62

7-
8-
## 说明
9-
10-
uView UI,是[uni-app](https://uniapp.dcloud.io/)生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
11-
12-
### **欢迎加群交流反馈:1129077272**
13-
14-
## 特性
15-
16-
- 兼容安卓,iOS,微信小程序,H5,QQ小程序,百度小程序,支付宝小程序,头条小程序
17-
- 60+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用
18-
- 众多贴心的JS利器,让您飞镖在手,召之即来,百步穿杨
19-
- 众多的常用页面和布局,让您专注逻辑,事半功倍
20-
- 详尽的文档支持,现代化的演示效果
21-
- 按需引入,精简打包体积
22-
23-
24-
## 预览
25-
26-
您可以通过**微信**扫码,查看最佳的演示效果。
27-
<br>
28-
<br>
29-
<img src="https://uviewui.com/common/weixin_mini_qrcode.png" width="220" height="220" >
30-
31-
32-
## 友情链接
33-
34-
<br>
35-
36-
#### **vue-admin-beautiful** —— [企业级、通用型中后台前端解决方案(基于vue/cli 4 最新版,同时支持电脑,手机,平板)](https://github.com/chuzhixin/vue-admin-beautiful)
37-
38-
#### **vue-admin-beautiful** —— [在线演示](http://beautiful.panm.cn/vue-admin-beautiful/#/index)
39-
40-
#### **pl-table** —— [ 完美解决 element 万级表格数据渲染卡顿问题](https://github.com/livelyPeng/pl-table)
41-
42-
#### **luch-request** —— [基于 Promise 开发的 uni-app 跨平台、项目级别的请求库,它有更小的体积,易用的 api,方便简单的自定义能力](https://www.quanzhan.co/luch-request/)
43-
<br>
44-
45-
## 链接
46-
47-
- [官方文档](https://uviewui.com/)
48-
- [更新日志](https://uviewui.com/components/changelog.html)
49-
- [升级指南](https://uviewui.com/components/changelog.html)
50-
- [关于我们](https://uviewui.com/cooperation/about.html)
51-
52-
## 交流反馈
53-
54-
欢迎加入我们的QQ群交流反馈:[点此跳转](https://www.uviewui.com/components/addQQGroup.html)
55-
56-
## 安装
57-
58-
#### **下载地址** —— [https://ext.dcloud.net.cn/plugin?id=1593](https://ext.dcloud.net.cn/plugin?id=1593)
59-
60-
## 快速上手
61-
62-
1. `main.js`引入uView库
63-
```js
64-
// main.js
65-
import uView from 'uview-ui';
66-
Vue.use(uView);
3+
## Project setup
674
```
68-
69-
2. `App.vue`引入基础样式(注意style标签需声明scss属性支持)
70-
```css
71-
/* App.vue */
72-
<style lang="scss">
73-
@import "uview-ui/index.scss";
74-
</style>
5+
npm install
756
```
767

77-
3. `uni.scss`引入全局scss变量文件
78-
```css
79-
/* uni.scss */
80-
@import "uview-ui/theme.scss";
8+
### Compiles and hot-reloads for development
819
```
82-
83-
4. `pages.json`配置easycom规则(按需引入)
84-
85-
```js
86-
// pages.json
87-
{
88-
"easycom": {
89-
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
90-
},
91-
// 此为本身已有的内容
92-
"pages": [
93-
// ......
94-
]
95-
}
10+
npm run serve
9611
```
9712

98-
请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容
99-
100-
## 使用方法
101-
配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
102-
103-
```html
104-
<template>
105-
<u-button>按钮</u-button>
106-
</template>
13+
### Compiles and minifies for production
14+
```
15+
npm run build
10716
```
10817

109-
请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容
110-
111-
112-
## 捐赠uView的研发
113-
114-
uView文档和源码全部开源免费,如果您认为uView帮到了您的开发工作,您可以捐赠uView的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。
115-
116-
<img src="https://uviewui.com/common/wechat.png" width="220" >
117-
<img style="margin-left: 100px;" src="https://uviewui.com/common/alipay.png" width="220" >
118-
119-
## 版权信息
120-
uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。
18+
### Customize configuration
19+
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
const plugins = []
2+
3+
if (process.env.UNI_OPT_TREESHAKINGNG) {
4+
plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js'))
5+
}
6+
7+
if (
8+
(
9+
process.env.UNI_PLATFORM === 'app-plus' &&
10+
process.env.UNI_USING_V8
11+
) ||
12+
(
13+
process.env.UNI_PLATFORM === 'h5' &&
14+
process.env.UNI_H5_BROWSER === 'builtin'
15+
)
16+
) {
17+
const path = require('path')
18+
19+
const isWin = /^win/.test(process.platform)
20+
21+
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path)
22+
23+
const input = normalizePath(process.env.UNI_INPUT_DIR)
24+
try {
25+
plugins.push([
26+
require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'),
27+
{
28+
file (file) {
29+
file = normalizePath(file)
30+
if (file.indexOf(input) === 0) {
31+
return path.relative(input, file)
32+
}
33+
return false
34+
}
35+
}
36+
])
37+
} catch (e) {}
38+
}
39+
40+
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']
41+
process.UNI_LIBRARIES.forEach(libraryName => {
42+
plugins.push([
43+
'import',
44+
{
45+
'libraryName': libraryName,
46+
'customName': (name) => {
47+
return `${libraryName}/lib/${name}/${name}`
48+
}
49+
}
50+
])
51+
})
52+
module.exports = {
53+
presets: [
54+
[
55+
'@vue/app',
56+
{
57+
modules: 'commonjs',
58+
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry'
59+
}
60+
]
61+
],
62+
plugins
63+
}

0 commit comments

Comments
 (0)