diff --git a/docker-compose.yml b/docker-compose.yml index 2de1857..f0b7a04 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -67,7 +67,7 @@ services: environment: - npm_config_unsafe_perm=true # 这里的命令优先级比较高,会自动覆盖镜像里面的命令 - command: npm run serve + command: npm run dev restart: always jvue-admin: privileged: true diff --git a/jvue-admin/Dockerfile b/jvue-admin/Dockerfile index 8868e77..79e063f 100644 --- a/jvue-admin/Dockerfile +++ b/jvue-admin/Dockerfile @@ -6,7 +6,7 @@ FROM node:10.15.1-alpine WORKDIR /app # 安装依赖 -COPY ./jvue-front/package.json ./ +COPY ./jvue-admin/package.json ./ # 因为被墙,单独安装 ENV SASS_BINARY_SITE https://npm.taobao.org/mirrors/node-sass diff --git a/jvue-front/build/build.dev.cmd b/jvue-front/build/build.dev.cmd index 6577ea0..4db9360 100644 --- a/jvue-front/build/build.dev.cmd +++ b/jvue-front/build/build.dev.cmd @@ -1,5 +1,4 @@ npm run clean &&^ npm run dev-build &&^ move %cd%\dist\index.html %cd%\dist\index.ssr.html &&^ -%cd%\build\cpm.cmd &&^ echo "build for development success." \ No newline at end of file diff --git a/jvue-front/build/build.dev.sh b/jvue-front/build/build.dev.sh index 49a41fb..ec525ed 100644 --- a/jvue-front/build/build.dev.sh +++ b/jvue-front/build/build.dev.sh @@ -3,5 +3,4 @@ pwd npm run clean npm run dev-build mv dist/index.html dist/index.ssr.html -build/cpm.sh echo "build for development success." \ No newline at end of file diff --git a/jvue-front/build/build.prod.cmd b/jvue-front/build/build.prod.cmd index ef458a8..f08fa61 100644 --- a/jvue-front/build/build.prod.cmd +++ b/jvue-front/build/build.prod.cmd @@ -1,5 +1,4 @@ npm run clean &&^ npm run build &&^ move %cd%\dist\index.html %cd%\dist\index.ssr.html &&^ -%cd%\build\cpm.cmd &&^ echo "build for production success." \ No newline at end of file diff --git a/jvue-front/build/build.prod.sh b/jvue-front/build/build.prod.sh index 603e12f..ec779b6 100644 --- a/jvue-front/build/build.prod.sh +++ b/jvue-front/build/build.prod.sh @@ -2,5 +2,4 @@ npm run clean npm run build mv dist/index.html dist/index.ssr.html -build/cpm.sh echo "build for production success." \ No newline at end of file diff --git a/jvue-front/build/cpm.cmd b/jvue-front/build/cpm.cmd deleted file mode 100644 index 26ae42c..0000000 --- a/jvue-front/build/cpm.cmd +++ /dev/null @@ -1,58 +0,0 @@ -REM %cd%\build\cpm.cmd -REM ncp [source] [dest] [--limit=concurrency limit] [--filter=filter] --stopOnErr - -REM clean && mkdir -del "dist/node_modules" /q -mkdir "dist/node_modules" - -REM core-js -node node_modules/ncp/bin/ncp node_modules/core-js dist/node_modules/core-js - -REM vue-server-renderer -node node_modules/ncp/bin/ncp node_modules/he dist/node_modules/he -node node_modules/ncp/bin/ncp node_modules/lodash._reinterpolate dist/node_modules/lodash._reinterpolate -node node_modules/ncp/bin/ncp node_modules/lodash.template dist/node_modules/lodash.template -node node_modules/ncp/bin/ncp node_modules/lodash.templatesettings dist/node_modules/lodash.templatesettings -node node_modules/ncp/bin/ncp node_modules/resolve dist/node_modules/resolve -node node_modules/ncp/bin/ncp node_modules/serialize-javascript dist/node_modules/serialize-javascript -node node_modules/ncp/bin/ncp node_modules/vue-server-renderer dist/node_modules/vue-server-renderer -del dist/node_modules/vue-server-renderer/node_modules /q - -REM vue -node node_modules/ncp/bin/ncp node_modules/vue dist/node_modules/vue - -REM vue-router -node node_modules/ncp/bin/ncp node_modules/vue-router dist/node_modules/vue-router - -REM axios -node node_modules/ncp/bin/ncp node_modules/axios dist/node_modules/axios -node node_modules/ncp/bin/ncp node_modules/is-buffer dist/node_modules/is-buffer -node node_modules/ncp/bin/ncp node_modules/follow-redirects dist/node_modules/follow-redirects - -REM bootstrap-vue -node node_modules/ncp/bin/ncp node_modules/bootstrap-vue dist/node_modules/bootstrap-vue -del "dist/node_modules/bootstrap-vue/node_modules" /q -del "dist/node_modules/bootstrap-vue/src" /q - -REM circular-json -node node_modules/ncp/bin/ncp node_modules/circular-json dist/node_modules/circular-json - -REM source-map -node node_modules/ncp/bin/ncp node_modules/source-map dist/node_modules/source-map - -REM url-search-params-polyfill -node node_modules/ncp/bin/ncp node_modules/url-search-params-polyfill dist/node_modules/url-search-params-polyfill - -REM vue-hljs -node node_modules/ncp/bin/ncp node_modules/vue-hljs dist/node_modules/vue-hljs -node node_modules/ncp/bin/ncp node_modules/highlight.js dist/node_modules/highlight.js - -REM element-ui -node node_modules/ncp/bin/ncp node_modules/element-ui dist/node_modules/element-ui -node node_modules/ncp/bin/ncp node_modules/deepmerge dist/node_modules/deepmerge -node node_modules/ncp/bin/ncp node_modules/resize-observer-polyfill dist/node_modules/resize-observer-polyfill -node node_modules/ncp/bin/ncp node_modules/throttle-debounce dist/node_modules/throttle-debounce -node node_modules/ncp/bin/ncp node_modules/normalize-wheel dist/node_modules/normalize-wheel -node node_modules/ncp/bin/ncp node_modules/async-validator dist/node_modules/async-validator -node node_modules/ncp/bin/ncp node_modules/babel-runtime dist/node_modules/babel-runtime -node node_modules/ncp/bin/ncp node_modules/babel-helper-vue-jsx-merge-props dist/node_modules/babel-helper-vue-jsx-merge-props \ No newline at end of file diff --git a/jvue-front/build/cpm.sh b/jvue-front/build/cpm.sh deleted file mode 100644 index 0528197..0000000 --- a/jvue-front/build/cpm.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash -# dos2unix ./build/cpm.sh && ./build/cpm.sh -# node_modules/ncp/bin/ncp [source] [dest] [--limit=concurrency limit] [--filter=filter] --stopOnErr - -# clean & mkdir -rm -rf dist/node_modules -mkdir -p dist/node_modules - -# core-js -node_modules/ncp/bin/ncp node_modules/core-js dist/node_modules/core-js - -# vue-server-renderer -node_modules/ncp/bin/ncp node_modules/he dist/node_modules/he -node_modules/ncp/bin/ncp node_modules/lodash._reinterpolate dist/node_modules/lodash._reinterpolate -node_modules/ncp/bin/ncp node_modules/lodash.template dist/node_modules/lodash.template -node_modules/ncp/bin/ncp node_modules/lodash.templatesettings dist/node_modules/lodash.templatesettings -node_modules/ncp/bin/ncp node_modules/resolve dist/node_modules/resolve -node_modules/ncp/bin/ncp node_modules/serialize-javascript dist/node_modules/serialize-javascript -node_modules/ncp/bin/ncp node_modules/vue-server-renderer dist/node_modules/vue-server-renderer -rm -rf dist/node_modules/vue-server-renderer/node_modules - -# vue -node_modules/ncp/bin/ncp node_modules/vue dist/node_modules/vue - -# vue-router -node_modules/ncp/bin/ncp node_modules/vue-router dist/node_modules/vue-router - -# axios -node_modules/ncp/bin/ncp node_modules/axios dist/node_modules/axios -node_modules/ncp/bin/ncp node_modules/is-buffer dist/node_modules/is-buffer -node_modules/ncp/bin/ncp node_modules/follow-redirects dist/node_modules/follow-redirects - -# bootstrap-vue -node_modules/ncp/bin/ncp node_modules/bootstrap-vue dist/node_modules/bootstrap-vue -rm -rf dist/node_modules/bootstrap-vue/node_modules -rm -rf dist/node_modules/bootstrap-vue/src - -# circular-json -node_modules/ncp/bin/ncp node_modules/circular-json dist/node_modules/circular-json - -# source-map -node_modules/ncp/bin/ncp node_modules/source-map dist/node_modules/source-map - -# url-search-params-polyfill -node_modules/ncp/bin/ncp node_modules/url-search-params-polyfill dist/node_modules/url-search-params-polyfill - -# vue-hljs -node_modules/ncp/bin/ncp node_modules/vue-hljs dist/node_modules/vue-hljs -node_modules/ncp/bin/ncp node_modules/highlight.js dist/node_modules/highlight.js - -# element-ui -node_modules/ncp/bin/ncp node_modules/element-ui dist/node_modules/element-ui -node_modules/ncp/bin/ncp node_modules/deepmerge dist/node_modules/deepmerge -node_modules/ncp/bin/ncp node_modules/resize-observer-polyfill dist/node_modules/resize-observer-polyfill -node_modules/ncp/bin/ncp node_modules/throttle-debounce dist/node_modules/throttle-debounce -node_modules/ncp/bin/ncp node_modules/normalize-wheel dist/node_modules/normalize-wheel -node_modules/ncp/bin/ncp node_modules/async-validator dist/node_modules/async-validator -node_modules/ncp/bin/ncp node_modules/babel-runtime dist/node_modules/babel-runtime -node_modules/ncp/bin/ncp node_modules/babel-helper-vue-jsx-merge-props dist/node_modules/babel-helper-vue-jsx-merge-props \ No newline at end of file diff --git a/jvue-front/package.json b/jvue-front/package.json index e62206d..efc6883 100644 --- a/jvue-front/package.json +++ b/jvue-front/package.json @@ -6,6 +6,7 @@ "clean": "rimraf dist", "lint": "vue-cli-service lint", "serve": "cross-env NODE_ENV=development vue-cli-service serve --port 3000", + "dev":"npm run clean && npm run dev-build && mv dist/index.html dist/index.ssr.html && npm run dev-start", "dev-build-entry-client": "cross-env SSR_ENV=client vue-cli-service build --mode development", "build-entry-client": "cross-env SSR_ENV=client vue-cli-service build", "dev-build-entry-server": "cross-env SSR_ENV=server vue-cli-service build --mode development --no-clean",