Skip to content

Commit c2db902

Browse files
committed
build mode
Former-commit-id: d5a534d89d254dbe88f51629455c322e699dc8b4
1 parent 8f61030 commit c2db902

9 files changed

Lines changed: 6 additions & 22 deletions

File tree

.env.netlify

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

.env.travis renamed to .env.preview

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# travis
1+
# 构建预览页面
22

33
# 指定构建模式
44
NODE_ENV=production
55

66
# 标记当前构建方式
7-
VUE_APP_BUILD_MODE=TRAVIS
7+
VUE_APP_BUILD_MODE=PREVIEW
88

99
# 显示源码按钮
1010
VUE_APP_SCOURCE_LINK=TRUE

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[![Build Status](https://www.travis-ci.org/d2-projects/d2-admin-start-kit.svg?branch=master)](https://www.travis-ci.org/d2-projects/d2-admin-start-kit)
2-
31
[D2Admin](https://github.com/d2-projects/d2-admin) simplified version of the start template, delete all the sample code in the full version, retain all core functions.
42

53
[Gitee](https://gitee.com/fairyever/d2-admin-start-kit)

README.zh.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[![Build Status](https://www.travis-ci.org/d2-projects/d2-admin-start-kit.svg?branch=master)](https://www.travis-ci.org/d2-projects/d2-admin-start-kit)
2-
31
[D2Admin](https://github.com/d2-projects/d2-admin) 简化版起始模板,删除所有完整版中的示例代码,保留所有核心功能。
42

53
[码云镜像](https://gitee.com/fairyever/d2-admin-start-kit)

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"dev": "npm run serve",
88
"build": "vue-cli-service build",
99
"build:nomock": "vue-cli-service build --mode nomock",
10-
"build:travis": "vue-cli-service build --mode travis",
11-
"build:github": "NODE_OPTIONS=--max_old_space_size=4096 npm run build:travis",
10+
"build:preview": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode preview",
1211
"lint": "vue-cli-service lint --fix",
1312
"test:unit": "vue-cli-service test:unit"
1413
},

src/components/d2-container/components/d2-source.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default {
1919
},
2020
computed: {
2121
show () {
22-
return process.env.VUE_APP_BUILD_MODE === 'TRAVIS' || process.env.NODE_ENV === 'development'
22+
return process.env.VUE_APP_SCOURCE_LINK === 'TRUE'
2323
}
2424
},
2525
watch: {

src/locales/mixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export default {
33
onChangeLocale (command) {
44
this.$i18n.locale = command
55
let message = `当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]`
6-
if (['TRAVIS', 'NETLIFY'].includes(process.env.VUE_APP_BUILD_MODE)) {
6+
if (process.env.VUE_APP_BUILD_MODE === 'PREVIEW') {
77
message = [
88
`当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]`,
99
`仅提供切换功能,没有配置具体的语言数据 `,

src/views/system/index/components/d2-badge/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<a><img src="https://img.shields.io/github/issues-pr-closed/d2-projects/d2-admin.svg"/></a>
1111
</p>
1212
<p align="center">
13-
<a href="https://www.travis-ci.org/d2-projects/d2-admin"><img src="https://www.travis-ci.org/d2-projects/d2-admin.svg?branch=master"/></a>
1413
<a><img src="https://img.shields.io/github/last-commit/d2-projects/d2-admin.svg"/></a>
1514
<a><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg"/></a>
1615
<a><img src="https://api.netlify.com/api/v1/badges/a5dd4bbd-da3f-4145-98a9-8012577bdcf5/deploy-status"/></a>

vue.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ module.exports = {
5858
// sourcemap不包含列信息
5959
config => config.devtool('cheap-source-map')
6060
)
61-
// TRAVIS 构建 vue-loader 添加 filename
61+
// 预览环境构建 vue-loader 添加 filename
6262
.when(process.env.VUE_APP_SCOURCE_LINK === 'TRUE',
6363
VueFilenameInjector(config, {
6464
propName: process.env.VUE_APP_SOURCE_VIEWER_PROP_NAME

0 commit comments

Comments
 (0)