feat: 修改前端打包方式 (#1288)

pull/1289/head
zhengkunwang223 1 year ago committed by GitHub
parent 586dee9e70
commit d2a067db77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,16 +10,16 @@ WEB_PATH=$(BASE_PAH)/frontend
SERVER_PATH=$(BASE_PAH)/backend SERVER_PATH=$(BASE_PAH)/backend
MAIN= $(BASE_PAH)/cmd/server/main.go MAIN= $(BASE_PAH)/cmd/server/main.go
APP_NAME=1panel APP_NAME=1panel
ASSERT_PATH= $(BASE_PAH)/cmd/server/web/asserts ASSERT_PATH= $(BASE_PAH)/cmd/server/web/assets
clean_asserts: clean_assets:
rm -rf $(ASSERT_PATH) rm -rf $(ASSERT_PATH)
upx_bin: upx_bin:
upx $(BUILD_PATH)/$(APP_NAME) upx $(BUILD_PATH)/$(APP_NAME)
build_frontend: build_frontend:
cd $(WEB_PATH) && npm install && npm run build:dev cd $(WEB_PATH) && npm install && npm run build:pro
build_backend_on_linux: build_backend_on_linux:
cd $(SERVER_PATH) \ cd $(SERVER_PATH) \
@ -35,4 +35,4 @@ build_backend_on_archlinux:
build_all: build_frontend build_backend_on_linux build_all: build_frontend build_backend_on_linux
build_on_local: clean_asserts build_frontend build_backend_on_darwin upx_bin build_on_local: clean_assets build_frontend build_backend_on_darwin upx_bin

@ -1,14 +1,14 @@
{ {
"name": "panel", "name": "panel",
"private": true, "private": true,
"version": "0.0.1", "version": "1.3",
"description": "1Panel 前端", "description": "1Panel 前端",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"serve": "vite", "serve": "vite",
"build:dev": "vite build --mode development", "build:dev": "vite build --mode development",
"build:test": "vue-tsc --noEmit && vite build --mode test", "build:test": "vue-tsc --noEmit && vite build --mode test",
"build:pro": "vue-tsc --noEmit && vite build --mode production", "build:pro": "vite build --mode production",
"preview": "vite preview", "preview": "vite preview",
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src", "lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
"lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"", "lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,scss,vue,html,md}\"",

Loading…
Cancel
Save