mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-12-25 16:21:50 +01:00
prepare for integration with Equinox
This commit is contained in:
parent
e21f3b9c75
commit
2c7ebd8ece
2
.github/workflows/build_pull_request.yml
vendored
2
.github/workflows/build_pull_request.yml
vendored
@ -55,7 +55,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
**/react/node_modules
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/react/yarn.lock') }}
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/webUI/yarn.lock') }}
|
||||
|
||||
- name: Build and copy webUI, Build Jar
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
|
2
.github/workflows/build_push.yml
vendored
2
.github/workflows/build_push.yml
vendored
@ -57,7 +57,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
**/react/node_modules
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/react/yarn.lock') }}
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/webUI/yarn.lock') }}
|
||||
|
||||
- name: Build and copy webUI, Build Jar
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
|
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@ -56,7 +56,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
**/react/node_modules
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/react/yarn.lock') }}
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/react/webUI.lock') }}
|
||||
|
||||
- name: Build and copy webUI, Build Jar
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,7 +6,7 @@ gradle.properties
|
||||
# Ignore Gradle build output directory
|
||||
build
|
||||
|
||||
server/src/main/resources/react
|
||||
server/src/main/resources/webUI
|
||||
server/tmp/
|
||||
server/tachiserver-data/
|
||||
|
||||
|
@ -35,12 +35,12 @@ object JavalinSetup {
|
||||
val app = Javalin.create { config ->
|
||||
try {
|
||||
// if the bellow line throws an exception then webUI is not bundled
|
||||
this::class.java.getResource("/react/index.html")
|
||||
this::class.java.getResource("/webUI/index.html")
|
||||
|
||||
// no exception so we can tell javalin to serve webUI
|
||||
hasWebUiBundled = true
|
||||
config.addStaticFiles("/react")
|
||||
config.addSinglePageRoot("/", "/react/index.html")
|
||||
config.addStaticFiles("/webUI")
|
||||
config.addSinglePageRoot("/", "/webUI/index.html")
|
||||
} catch (e: RuntimeException) {
|
||||
logger.warn("react build files are missing.")
|
||||
hasWebUiBundled = false
|
||||
|
@ -2,7 +2,7 @@ plugins {
|
||||
id("com.github.node-gradle.node") version "3.0.1"
|
||||
}
|
||||
|
||||
val nodeRoot = "${project.projectDir}/react"
|
||||
val nodeRoot = "${project.projectDir}/src"
|
||||
node {
|
||||
nodeProjectDir.set(file(nodeRoot))
|
||||
}
|
||||
@ -10,7 +10,7 @@ node {
|
||||
tasks {
|
||||
register<Copy>("copyBuild") {
|
||||
from(file("$nodeRoot/build"))
|
||||
into(file("$rootDir/server/src/main/resources/react"))
|
||||
into(file("$rootDir/server/src/main/resources/webUI"))
|
||||
|
||||
dependsOn("yarn_build")
|
||||
}
|
||||
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
Before Width: | Height: | Size: 579 KiB After Width: | Height: | Size: 579 KiB |
Loading…
Reference in New Issue
Block a user