-
Notifications
You must be signed in to change notification settings - Fork 3
Initialize project #1
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
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Loading status checks…
Inital commit
- Loading branch information
commit ce05bcb1341c50e5f19ec78baf80b1615ee4b54f
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ci: | ||
uses: halo-sigs/reusable-workflows/.github/workflows/plugin-ci.yaml@v1 | ||
with: | ||
ui-path: "ui" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
### Maven | ||
target/ | ||
logs/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
|
||
### Gradle | ||
.gradle | ||
/build/ | ||
/out/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
bin/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
log/ | ||
|
||
### NetBeans ### | ||
nbproject/private/ | ||
build/ | ||
nbbuild/ | ||
dist/ | ||
nbdist/ | ||
.nb-gradle/ | ||
|
||
### Mac | ||
.DS_Store | ||
*/.DS_Store | ||
|
||
### VS Code ### | ||
*.project | ||
*.factorypath | ||
|
||
### Compiled class file | ||
*.class | ||
|
||
### Log file | ||
*.log | ||
|
||
### BlueJ files | ||
*.ctxt | ||
|
||
### Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
### Package Files | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
### VSCode | ||
.vscode | ||
|
||
### Local file | ||
application-local.yml | ||
application-local.yaml | ||
application-local.properties | ||
|
||
/ui/node_modules/ | ||
/workplace/ | ||
/src/main/resources/console/ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
reviewers: | ||
- ruibaby | ||
- guqing | ||
- JohnNiang | ||
- wangzhen-fit2cloud | ||
|
||
approvers: | ||
- ruibaby | ||
- guqing | ||
- JohnNiang |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,77 @@ | ||
# plugin-alist | ||
|
||
AList 存储库插件,支持创建 AList 类型的存储库 | ||
|
||
## 开发环境 | ||
|
||
插件开发的详细文档请查阅:<https://docs.halo.run/developer-guide/plugin/introduction> | ||
|
||
所需环境: | ||
|
||
1. Java 17 | ||
2. Node 18 | ||
3. pnpm 8 | ||
4. Docker (可选) | ||
|
||
克隆项目: | ||
|
||
```bash | ||
git clone git@github.com:halo-sigs/plugin-alist.git | ||
|
||
# 或者当你 fork 之后 | ||
|
||
git clone git@github.com:{your_github_id}/plugin-alist.git | ||
``` | ||
|
||
```bash | ||
cd path/to/plugin-alist | ||
``` | ||
|
||
### 运行方式 1(推荐) | ||
|
||
> 此方式需要本地安装 Docker | ||
|
||
```bash | ||
# macOS / Linux | ||
./gradlew pnpmInstall | ||
|
||
# Windows | ||
./gradlew.bat pnpmInstall | ||
``` | ||
|
||
```bash | ||
# macOS / Linux | ||
./gradlew haloServer | ||
|
||
# Windows | ||
./gradlew.bat haloServer | ||
``` | ||
|
||
执行此命令后,会自动创建一个 Halo 的 Docker | ||
容器并加载当前的插件,更多文档可查阅:<https://docs.halo.run/developer-guide/plugin/basics/devtools> | ||
|
||
### 运行方式 2 | ||
|
||
> 此方式需要使用源码运行 Halo | ||
|
||
编译插件: | ||
|
||
```bash | ||
# macOS / Linux | ||
./gradlew build | ||
|
||
# Windows | ||
./gradlew.bat build | ||
``` | ||
|
||
修改 Halo 配置文件: | ||
|
||
```yaml | ||
halo: | ||
plugin: | ||
runtime-mode: development | ||
fixedPluginPath: | ||
- "/path/to/plugin-alist" | ||
``` | ||
|
||
最后重启 Halo 项目即可。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
plugins { | ||
id 'java' | ||
id "com.github.node-gradle.node" version "7.0.2" | ||
id "io.freefair.lombok" version "8.0.1" | ||
id "run.halo.plugin.devtools" version "0.0.9" | ||
} | ||
|
||
group 'run.halo.alist' | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url 'https://s01.oss.sonatype.org/content/repositories/releases' } | ||
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' } | ||
maven { url 'https://repo.spring.io/milestone' } | ||
} | ||
|
||
dependencies { | ||
implementation platform('run.halo.tools.platform:plugin:2.17.0-SNAPSHOT') | ||
compileOnly 'run.halo.app:api' | ||
|
||
testImplementation 'run.halo.app:api' | ||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
node { | ||
nodeProjectDir = file("${project.projectDir}/ui") | ||
} | ||
|
||
tasks.register('buildFrontend', PnpmTask) { | ||
args = ['build'] | ||
dependsOn('installDepsForUI') | ||
} | ||
|
||
tasks.register('installDepsForUI', PnpmTask) { | ||
args = ['install'] | ||
} | ||
|
||
build { | ||
// build frontend before build | ||
tasks.named('compileJava').configure { | ||
dependsOn('buildFrontend') | ||
} | ||
} | ||
|
||
halo { | ||
version = '2.17' | ||
superAdminUsername = 'admin' | ||
superAdminPassword = 'admin' | ||
externalUrl = 'http://localhost:8090' | ||
docker { | ||
// windows 默认为 npipe:////./pipe/docker_engine | ||
url = 'unix:///var/run/docker.sock' | ||
apiVersion = '1.45' | ||
} | ||
port = 8090 | ||
debug = true | ||
debugPort = 5005 | ||
suspend = true | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version=1.0.0-SNAPSHOT |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Wed May 10 13:57:01 CST 2023 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.