Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import front #39

Merged
merged 1 commit into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions jvue-admin/vue.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
// https://cli.vuejs.org/zh/config/#configurewebpack
configureWebpack: config => {
// 解决Invalid Host header
config.devServer.set('disableHostCheck', true);
}
}
9 changes: 9 additions & 0 deletions jvue-front/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 全局环境变量
# 应用根路径
VUE_APP_PUBLIC_PATH=/
# 后台管理根路径
VUE_APP_ADMIN_PATH=/a
# 是否允许打印debug日志
VUE_APP_DEBUG=true
VUE_APP_INFO=true
VUE_APP_ERROR=true
1 change: 1 addition & 0 deletions jvue-front/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 开发环境环境变量
1 change: 1 addition & 0 deletions jvue-front/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 生产环境环境变量
1 change: 1 addition & 0 deletions jvue-front/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 测试环境环境变量
1 change: 1 addition & 0 deletions jvue-front/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.min.js
13 changes: 11 additions & 2 deletions jvue-front/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@ module.exports = {
},
extends: ["plugin:vue/essential", "@vue/prettier"],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
"no-undef": "off",
"no-console": "off", //process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"no-unused-vars": [
2,
{
vars: "local",
args: "none"
}
],
semi: ["error", "always"]
},
parserOptions: {
parser: "babel-eslint"
Expand Down
5 changes: 0 additions & 5 deletions jvue-front/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,12 @@
node_modules
/dist

/tests/e2e/reports/
selenium-debug.log

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
Expand Down
21 changes: 0 additions & 21 deletions jvue-front/Dockerfile

This file was deleted.

39 changes: 0 additions & 39 deletions jvue-front/README.md

This file was deleted.

5 changes: 5 additions & 0 deletions jvue-front/build/build.dev.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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."
7 changes: 7 additions & 0 deletions jvue-front/build/build.dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
pwd
npm run clean
npm run dev-build
mv dist/index.html dist/index.ssr.html
build/cpm.sh
echo "build for development success."
5 changes: 5 additions & 0 deletions jvue-front/build/build.prod.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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."
6 changes: 6 additions & 0 deletions jvue-front/build/build.prod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
npm run clean
npm run build
mv dist/index.html dist/index.ssr.html
build/cpm.sh
echo "build for production success."
58 changes: 58 additions & 0 deletions jvue-front/build/cpm.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
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
59 changes: 59 additions & 0 deletions jvue-front/build/cpm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/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
18 changes: 0 additions & 18 deletions jvue-front/jest.config.js

This file was deleted.

79 changes: 60 additions & 19 deletions jvue-front/package.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,76 @@
{
"name": "jvue-front",
"version": "0.1.0",
"name": "jvue",
"version": "3.0.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --port 3000",
"dev": "vue-cli-service serve --port 3000 --mode production",
"start": "npm run build && npm run dev",
"build": "vue-cli-service build",
"clean": "rimraf dist",
"lint": "vue-cli-service lint",
"test:e2e": "vue-cli-service test:e2e",
"test:unit": "vue-cli-service test:unit"
"serve": "cross-env NODE_ENV=development vue-cli-service serve",
"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",
"build-entry-server": "cross-env SSR_ENV=server vue-cli-service build --no-clean",
"dev-build": "npm run dev-build-entry-client && npm run dev-build-entry-server && node node_modules/@babel/cli/bin/babel --presets=@babel/preset-env -o dist/server.js src/server.js",
"build": "npm run build-entry-client && npm run build-entry-server && node node_modules/@babel/cli/bin/babel -o dist/server.js --presets=@babel/preset-env,minify src/server.js",
"build-nossr": "npm run build-entry-client",
"dev-build-nossr": "npm run dev-build-entry-client",
"dev-start": "cross-env NODE_ENV=development node tests/dev-server.js",
"prod-start": "cross-env NODE_ENV=production node tests/dev-server.js",
"v8-dev-start": "cross-env NODE_ENV=development node tests/v8-server.js",
"v8-prod-start": "cross-env NODE_ENV=production node tests/v8-server.js"
},
"dependencies": {
"vue": "^2.6.6",
"vue-router": "^3.0.1"
"axios": "^0.18.0",
"bootstrap": "latest",
"bootstrap-vue": "^2.0.0-rc.13",
"circular-json": "^0.5.9",
"element-ui": "^2.6.1",
"font-awesome": "^4.7.0",
"url-search-params-polyfill": "^5.0.0",
"v-toaster": "^1.0.3",
"vue": "^2.6.7",
"vue-hljs": "^1.1.2",
"vue-progressbar": "^0.7.5",
"vue-router": "^3.0.2",
"vue-server-renderer": "^2.6.7",
"vue-uweb": "^0.2.1",
"vue-web-storage": "^4.0.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.5.0",
"@vue/cli-plugin-e2e-nightwatch": "^3.5.0",
"@vue/cli-plugin-eslint": "^3.5.0",
"@vue/cli-plugin-unit-jest": "^3.5.0",
"@vue/cli-service": "^3.5.0",
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@vue/cli-plugin-babel": "^3.4.0",
"@vue/cli-plugin-eslint": "^3.4.0",
"@vue/cli-service": "^3.4.0",
"@vue/eslint-config-prettier": "^4.0.1",
"@vue/test-utils": "1.0.0-beta.29",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-minify": "^0.5.0",
"babel-preset-minify": "^0.5.0",
"cross-env": "^5.2.0",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0",
"express": "^4.16.4",
"lint-staged": "^8.1.0",
"ncp": "^2.0.0",
"node-sass": "^4.9.0",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.5.21"
"rimraf": "^2.6.3",
"sass-loader": "7.1.0",
"vue-template-compiler": "^2.5.21",
"webpack": "^4.29.5",
"webpack-node-externals": "^1.7.2"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.js": [
"vue-cli-service lint",
"git add"
],
"*.vue": [
"vue-cli-service lint",
"git add"
]
}
}
Binary file modified jvue-front/public/favicon.ico
Binary file not shown.
Loading