Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/admin-frontend/pnpm-lock.yaml') }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/console/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Frontend Dependencies
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Halo 2.0 插件开发快速开始模板(WIP)
.
├── LICENSE
├── README.md
├── admin-frontend
├── console
│   ├── README.md
│   ├── env.d.ts
│   ├── package.json
Expand All @@ -18,7 +18,7 @@ Halo 2.0 插件开发快速开始模板(WIP)
│   │   │   └── logo.svg
│   │   ├── components
│   │   │   └── HelloWorld.vue
│   │   ├── index.ts # Admin Frontend Entry file
│   │   ├── index.ts # Console Frontend Entry file
│   │   ├── styles
│   │   │   └── index.css
│   │   └── views
Expand Down Expand Up @@ -48,8 +48,8 @@ Halo 2.0 插件开发快速开始模板(WIP)
│   ├── ApplesController.java
│   └── TemplatePlugin.java # Main Class
└── resources
├── admin
│   ├── main.js # Admin Frontend Entry file(production build)
├── console
│   ├── main.js # Console Frontend Entry file(production build)
│   └── style.css
├── extensions
│   ├── apple.yaml
Expand All @@ -65,7 +65,7 @@ Halo 2.0 插件开发快速开始模板(WIP)

对于以上目录树:

- `admin-frontend`: 插件前端项目目录,为一个 Vue 项目,技术栈为 Vue 3 + Vite,其中已经预配置好了构建策略。
- `console`: 插件前端项目目录,为一个 Vue 项目,技术栈为 Vue 3 + Vite,其中已经预配置好了构建策略。
- `build`:插件后端构建目录,`build/libs` 下的 jar 包为最终插件产物。
- `lib`:为临时的 Halo 依赖,为了使用 Halo 中提供的类在 `build.gradle`
中作为编译时依赖引入 `compileOnly files("lib/halo-2.0.0-SNAPSHOT-plain.jar")`
Expand Down Expand Up @@ -184,7 +184,7 @@ Halo 2.0 插件开发快速开始模板(WIP)
```

- `resources`:目录为插件资源目录
- `admin` 目录下为插件前端打包后的产物存放目录,固定为 `main.js` 和 `style.css `两个文件
- `console` 目录下为插件前端打包后的产物存放目录,固定为 `main.js` 和 `style.css `两个文件
- `extensions` 存放自定义模型资源配置
- `plugin.yaml`为插件描述配置
- `static` 为静态资源示例目录
Expand Down Expand Up @@ -283,11 +283,11 @@ mkdir ./halo-dev/dev-plugins # 存放插件源码
```bash
cd ./halo-dev

git clone https://github.com/halo-dev/halo --branch next
git clone https://github.com/halo-dev/halo --branch main
```

```bash
git clone https://github.com/halo-dev/halo-admin --branch next
git clone https://github.com/halo-dev/console --branch main
```

```bash
Expand Down Expand Up @@ -360,10 +360,10 @@ cd ./halo-dev/halo

或者在 IntelliJ IDEA 中运行 Application 启动类。但注意需要配置好 `spring.profiles.active` 为 dev。

### 启动 Halo Admin
### 启动 Console

```bash
cd ./halo-dev/halo-admin
cd ./halo-dev/console

pnpm install

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ test {
}

node {
nodeProjectDir = file("${project.projectDir}/admin-frontend")
nodeProjectDir = file("${project.projectDir}/console")
}

task buildFrontend(type: NpxTask) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions admin-frontend/package.json → console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
"dependencies": {
"@halo-dev/admin-shared": "*",
"@halo-dev/components": "*",
"@halo-dev/console-shared": "^0.0.0-alpha.5",
"@halo-dev/components": "^0.0.0-alpha.4",
"vue": "^3.2.37"
},
"devDependencies": {
Expand Down
164 changes: 128 additions & 36 deletions admin-frontend/pnpm-lock.yaml → console/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes
2 changes: 1 addition & 1 deletion admin-frontend/src/index.ts → console/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { definePlugin, BasicLayout } from "@halo-dev/admin-shared";
import { definePlugin, BasicLayout } from "@halo-dev/console-shared";
import DefaultView from "./views/DefaultView.vue";
import { IconGrid } from "@halo-dev/components";
import "./styles/index.css";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading