mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 08:19:15 +08:00
feat: 修改前端打包方式 (#1288)
This commit is contained in:
parent
586dee9e70
commit
d2a067db77
8
Makefile
8
Makefile
@ -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}\"",
|
||||||
@ -95,7 +95,7 @@
|
|||||||
"vue-tsc": "^0.29.8"
|
"vue-tsc": "^0.29.8"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"esbuild":"npm:esbuild-wasm@latest"
|
"esbuild": "npm:esbuild-wasm@latest"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"commitizen": {
|
"commitizen": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user