From bc8de996199b19c72debf10179e7b307dbe1f46f Mon Sep 17 00:00:00 2001 From: FairyEver <1711467488@qq.com> Date: Thu, 12 Dec 2019 10:00:30 +0800 Subject: [PATCH] build:preview Former-commit-id: a15d2e58d9d8b1ce25577f2482e282c446609276 Former-commit-id: ebfe59a4d26fb025d35cdc1aeb950681a1c21aa1 Former-commit-id: bbb06ef0ab554f44320ec0775ce93731c3563626 Former-commit-id: bf87aa7c70b632e52f3d20a10afcd1427858f94f [formerly 52146f15099694bff9a7211c538ce83dc185c599] Former-commit-id: 0e976f7b13d707a015b7c89a04c5dfbbd099d29c Former-commit-id: 82a4a0506d806af6dc2757ccf485aab9e5e5f3ee Former-commit-id: 2c3c94b0f7b1f87e48e1216b23ee91c7c3f717c6 Former-commit-id: 5d98af7658f3134a350681b0182b97753eaa4ddb Former-commit-id: 30309394129fb1dc2c28c4780881147254a81e3b --- .env.netlify | 10 -------- .env.travis => .env.preview | 4 +-- .github/workflows/deploy.yml | 2 +- .travis.yml | 25 ------------------- README.md | 3 --- README.zh.md | 3 --- package.json | 6 ++--- src/locales/mixin.js | 2 +- .../index/components/d2-badge/index.vue | 1 - vue.config.js | 2 +- 10 files changed, 7 insertions(+), 51 deletions(-) delete mode 100644 .env.netlify rename .env.travis => .env.preview (78%) delete mode 100644 .travis.yml diff --git a/.env.netlify b/.env.netlify deleted file mode 100644 index 7e99b847..00000000 --- a/.env.netlify +++ /dev/null @@ -1,10 +0,0 @@ -# travis - -# 指定构建模式 -NODE_ENV=production - -# 标记当前构建方式 -VUE_APP_BUILD_MODE=NETLIFY - -# 显示源码按钮 -VUE_APP_SCOURCE_LINK=TRUE diff --git a/.env.travis b/.env.preview similarity index 78% rename from .env.travis rename to .env.preview index 99320dcd..afd9bd54 100644 --- a/.env.travis +++ b/.env.preview @@ -1,10 +1,10 @@ -# travis +# 构建预览页面 # 指定构建模式 NODE_ENV=production # 标记当前构建方式 -VUE_APP_BUILD_MODE=TRAVIS +VUE_APP_BUILD_MODE=PREVIEW # 显示源码按钮 VUE_APP_SCOURCE_LINK=TRUE diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2ec590f7..8b3f93a2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ jobs: - name: Build run: | npm install - npm run build:github + npm run build:preview - name: Deploy uses: SamKirkland/FTP-Deploy-Action@2.0.0 env: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 41bb3583..00000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: node_js -node_js: stable - -notifications: - webhooks: https://oapi.dingtalk.com/robot/send?access_token=a0918ec1b0461056fb9953fe2b03ecc3074a629e88992f327cc94bae93349e9e - -cache: - directories: - - "node_modules" - -branches: - only: - - master - -script: - - yarn run build:travis - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -after_success: - - ./deploy/qshell account $AK $SK liyang - - ./deploy/qshell qupload ./deploy/upload.conf - - ./deploy/qshell cdnrefresh --dirs -i ./deploy/cdnrefresh.txt \ No newline at end of file diff --git a/README.md b/README.md index 8fb6297d..4ccd0c2d 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,6 @@
-
-
-
diff --git a/README.zh.md b/README.zh.md
index 52c6075b..1f2abdba 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -17,9 +17,6 @@
-
-
-
diff --git a/package.json b/package.json
index 2f728af9..e893d325 100644
--- a/package.json
+++ b/package.json
@@ -3,12 +3,10 @@
"version": "1.7.2",
"scripts": {
"serve": "vue-cli-service serve --open",
- "build": "vue-cli-service build",
"lint": "vue-cli-service lint --fix",
- "build:netlify": "vue-cli-service build --mode netlify",
+ "build": "vue-cli-service build",
"build:nomock": "vue-cli-service build --mode nomock",
- "build:travis": "vue-cli-service build --mode travis",
- "build:github": "NODE_OPTIONS=--max_old_space_size=4096 npm run build:travis",
+ "build:preview": "NODE_OPTIONS=--max_old_space_size=4096 vue-cli-service build --mode preview",
"dev": "npm run serve",
"i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'",
"start": "npm run serve",
diff --git a/src/locales/mixin.js b/src/locales/mixin.js
index 269a1188..c7323ff2 100644
--- a/src/locales/mixin.js
+++ b/src/locales/mixin.js
@@ -3,7 +3,7 @@ export default {
onChangeLocale (command) {
this.$i18n.locale = command
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 = [
`当前语言:${this.$t('_name')} [ ${this.$i18n.locale} ]`,
`仅提供切换功能,没有配置具体的语言数据 `,
diff --git a/src/views/system/index/components/d2-badge/index.vue b/src/views/system/index/components/d2-badge/index.vue
index 62b15be3..ed348004 100644
--- a/src/views/system/index/components/d2-badge/index.vue
+++ b/src/views/system/index/components/d2-badge/index.vue
@@ -10,7 +10,6 @@
-
diff --git a/vue.config.js b/vue.config.js
index 8c4d0f72..9b70d35e 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -58,7 +58,7 @@ module.exports = {
// sourcemap不包含列信息
config => config.devtool('cheap-source-map')
)
- // TRAVIS 构建 vue-loader 添加 filename
+ // 预览环境构建 vue-loader 添加 filename
.when(process.env.VUE_APP_SCOURCE_LINK === 'TRUE',
VueFilenameInjector(config, {
propName: process.env.VUE_APP_SOURCE_VIEWER_PROP_NAME