build mode
Former-commit-id: d5a534d89d254dbe88f51629455c322e699dc8b4
This commit is contained in:
@@ -1,10 +0,0 @@
|
|||||||
# travis
|
|
||||||
|
|
||||||
# 指定构建模式
|
|
||||||
NODE_ENV=production
|
|
||||||
|
|
||||||
# 标记当前构建方式
|
|
||||||
VUE_APP_BUILD_MODE=NETLIFY
|
|
||||||
|
|
||||||
# 显示源码按钮
|
|
||||||
VUE_APP_SCOURCE_LINK=TRUE
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
# travis
|
# 构建预览页面
|
||||||
|
|
||||||
# 指定构建模式
|
# 指定构建模式
|
||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
|
|
||||||
# 标记当前构建方式
|
# 标记当前构建方式
|
||||||
VUE_APP_BUILD_MODE=TRAVIS
|
VUE_APP_BUILD_MODE=PREVIEW
|
||||||
|
|
||||||
# 显示源码按钮
|
# 显示源码按钮
|
||||||
VUE_APP_SCOURCE_LINK=TRUE
|
VUE_APP_SCOURCE_LINK=TRUE
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
[](https://www.travis-ci.org/d2-projects/d2-admin-start-kit)
|
|
||||||
|
|
||||||
[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.
|
[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.
|
||||||
|
|
||||||
[Gitee](https://gitee.com/fairyever/d2-admin-start-kit)
|
[Gitee](https://gitee.com/fairyever/d2-admin-start-kit)
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
[](https://www.travis-ci.org/d2-projects/d2-admin-start-kit)
|
|
||||||
|
|
||||||
[D2Admin](https://github.com/d2-projects/d2-admin) 简化版起始模板,删除所有完整版中的示例代码,保留所有核心功能。
|
[D2Admin](https://github.com/d2-projects/d2-admin) 简化版起始模板,删除所有完整版中的示例代码,保留所有核心功能。
|
||||||
|
|
||||||
[码云镜像](https://gitee.com/fairyever/d2-admin-start-kit)
|
[码云镜像](https://gitee.com/fairyever/d2-admin-start-kit)
|
||||||
+1
-2
@@ -7,8 +7,7 @@
|
|||||||
"dev": "npm run serve",
|
"dev": "npm run serve",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
"build:nomock": "vue-cli-service build --mode nomock",
|
"build:nomock": "vue-cli-service build --mode nomock",
|
||||||
"build:travis": "vue-cli-service build --mode travis",
|
"build:preview": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode preview",
|
||||||
"build:github": "NODE_OPTIONS=--max_old_space_size=4096 npm run build:travis",
|
|
||||||
"lint": "vue-cli-service lint --fix",
|
"lint": "vue-cli-service lint --fix",
|
||||||
"test:unit": "vue-cli-service test:unit"
|
"test:unit": "vue-cli-service test:unit"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show () {
|
show () {
|
||||||
return process.env.VUE_APP_BUILD_MODE === 'TRAVIS' || process.env.NODE_ENV === 'development'
|
return process.env.VUE_APP_SCOURCE_LINK === 'TRUE'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ export default {
|
|||||||
onChangeLocale (command) {
|
onChangeLocale (command) {
|
||||||
this.$i18n.locale = command
|
this.$i18n.locale = command
|
||||||
let message = `当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]`
|
let message = `当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]`
|
||||||
if (['TRAVIS', 'NETLIFY'].includes(process.env.VUE_APP_BUILD_MODE)) {
|
if (process.env.VUE_APP_BUILD_MODE === 'PREVIEW') {
|
||||||
message = [
|
message = [
|
||||||
`当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]`,
|
`当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]`,
|
||||||
`仅提供切换功能,没有配置具体的语言数据 `,
|
`仅提供切换功能,没有配置具体的语言数据 `,
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
<a><img src="https://img.shields.io/github/issues-pr-closed/d2-projects/d2-admin.svg"/></a>
|
<a><img src="https://img.shields.io/github/issues-pr-closed/d2-projects/d2-admin.svg"/></a>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<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>
|
|
||||||
<a><img src="https://img.shields.io/github/last-commit/d2-projects/d2-admin.svg"/></a>
|
<a><img src="https://img.shields.io/github/last-commit/d2-projects/d2-admin.svg"/></a>
|
||||||
<a><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg"/></a>
|
<a><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg"/></a>
|
||||||
<a><img src="https://api.netlify.com/api/v1/badges/a5dd4bbd-da3f-4145-98a9-8012577bdcf5/deploy-status"/></a>
|
<a><img src="https://api.netlify.com/api/v1/badges/a5dd4bbd-da3f-4145-98a9-8012577bdcf5/deploy-status"/></a>
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ module.exports = {
|
|||||||
// sourcemap不包含列信息
|
// sourcemap不包含列信息
|
||||||
config => config.devtool('cheap-source-map')
|
config => config.devtool('cheap-source-map')
|
||||||
)
|
)
|
||||||
// TRAVIS 构建 vue-loader 添加 filename
|
// 预览环境构建 vue-loader 添加 filename
|
||||||
.when(process.env.VUE_APP_SCOURCE_LINK === 'TRUE',
|
.when(process.env.VUE_APP_SCOURCE_LINK === 'TRUE',
|
||||||
VueFilenameInjector(config, {
|
VueFilenameInjector(config, {
|
||||||
propName: process.env.VUE_APP_SOURCE_VIEWER_PROP_NAME
|
propName: process.env.VUE_APP_SOURCE_VIEWER_PROP_NAME
|
||||||
|
|||||||
Reference in New Issue
Block a user