Skip to content

Commit

Permalink
prepare for integration with Equinox
Browse files Browse the repository at this point in the history
  • Loading branch information
AriaMoradi committed Jun 5, 2021
1 parent e21f3b9 commit 2c7ebd8
Show file tree
Hide file tree
Showing 75 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions webUI/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ 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))
}

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")
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2c7ebd8

Please sign in to comment.