mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 07:57:21 +08:00
feat: 移动embed到pkg下
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -55,7 +55,7 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: frontend
|
||||
path: internal/embed/frontend
|
||||
path: pkg/embed/frontend
|
||||
- name: Set build info
|
||||
run: |
|
||||
echo "VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo '0.0.0')" >> $GITHUB_ENV
|
||||
|
||||
@@ -17,11 +17,11 @@ import (
|
||||
|
||||
"github.com/tnb-labs/panel/internal/app"
|
||||
"github.com/tnb-labs/panel/internal/biz"
|
||||
"github.com/tnb-labs/panel/internal/embed"
|
||||
"github.com/tnb-labs/panel/internal/http/request"
|
||||
"github.com/tnb-labs/panel/pkg/acme"
|
||||
"github.com/tnb-labs/panel/pkg/api"
|
||||
"github.com/tnb-labs/panel/pkg/cert"
|
||||
"github.com/tnb-labs/panel/pkg/embed"
|
||||
"github.com/tnb-labs/panel/pkg/io"
|
||||
"github.com/tnb-labs/panel/pkg/nginx"
|
||||
"github.com/tnb-labs/panel/pkg/punycode"
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
|
||||
"github.com/tnb-labs/panel/internal/embed"
|
||||
"github.com/tnb-labs/panel/internal/http/middleware"
|
||||
"github.com/tnb-labs/panel/internal/service"
|
||||
"github.com/tnb-labs/panel/pkg/apploader"
|
||||
"github.com/tnb-labs/panel/pkg/embed"
|
||||
)
|
||||
|
||||
type Http struct {
|
||||
|
||||
@@ -2,10 +2,11 @@ package embed
|
||||
|
||||
import "embed"
|
||||
|
||||
// TODO 移到pkg目录下
|
||||
|
||||
//go:embed all:frontend/*
|
||||
var PublicFS embed.FS
|
||||
|
||||
//go:embed all:website/*
|
||||
var WebsiteFS embed.FS
|
||||
|
||||
//go:embed all:locales/*
|
||||
var LocalesFS embed.FS
|
||||
0
pkg/embed/locales/.gitkeep
Normal file
0
pkg/embed/locales/.gitkeep
Normal file
@@ -19,7 +19,7 @@
|
||||
"lint": "run-s gen-auto-import lint-only",
|
||||
"lint-only": "eslint . --fix",
|
||||
"format": "prettier --write src/",
|
||||
"copy": "cpx \"dist/**/*\" \"../internal/embed/frontend\" -C",
|
||||
"copy": "cpx \"dist/**/*\" \"../pkg/embed/frontend\" -C",
|
||||
"gen-auto-import": "tsx gen-auto-import.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user