Skip to content

Commit

Permalink
test simpler build, use zustand and pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
toinux committed Mar 12, 2024
1 parent dd4e00f commit 33635b3
Show file tree
Hide file tree
Showing 17 changed files with 2,892 additions and 2,535 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/gradle-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ jobs:
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '21.4.0'
cache: 'yarn'
cache-dependency-path: front/yarn.lock
cache: 'pnpm'
- name: Install pnpm dependencies
working-directory: ./front
run: pnpm install
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
Expand Down
26 changes: 1 addition & 25 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import com.github.gradle.node.yarn.task.YarnInstallTask
import com.github.gradle.node.yarn.task.YarnTask

plugins {
java
id("org.springframework.boot") version "3.2.1"
id("org.springframework.boot") version "3.2.3"
id("io.spring.dependency-management") version "1.1.4"
id("com.github.node-gradle.node") version "7.0.1"
}

group = "org.antonus"
Expand Down Expand Up @@ -50,27 +46,7 @@ tasks.withType<Test> {
useJUnitPlatform()
}

tasks.npmInstall {
enabled=false
}

tasks.named<YarnInstallTask>(YarnInstallTask.NAME){
workingDir = file("${project.projectDir}/front")
ignoreExitValue.set(true)
}

val yarnBuild = tasks.register<YarnTask>("yarnBuild") {
dependsOn(YarnInstallTask.NAME)
workingDir = file("${project.projectDir}/front")
args.set(listOf("build"))
inputs.dir(fileTree("front/src").exclude("**/*.test.js").exclude("**/*.spec.js").exclude("**/__tests__/**/*.js"))
inputs.dir("front/node_modules")
outputs.dir("front/dist")
}


val copyReact = tasks.register<Copy>("copyReact") {
dependsOn(yarnBuild)
from("front/dist")
into("build/resources/main/static/")
}
Expand Down
45 changes: 0 additions & 45 deletions front/.yarnclean

This file was deleted.

17 changes: 9 additions & 8 deletions front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,25 @@
},
"dependencies": {
"@popperjs/core": "^2.11.8",
"bootstrap": "^5.3.2",
"bootstrap": "^5.3.3",
"debounce": "^2.0.0",
"react": "^18.2.0",
"react-bootstrap": "^2.9.1",
"react-bootstrap": "^2.10.1",
"react-colorful": "^5.6.1",
"react-dom": "^18.2.0",
"react-icons": "^4.12.0",
"react-promise-tracker": "^2.1.1",
"react-toastify": "^9.1.3"
"react-toastify": "^9.1.3",
"zustand": "^4.5.2"
},
"devDependencies": {
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@types/react": "^18.2.64",
"@types/react-dom": "^18.2.21",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.55.0",
"eslint-plugin-react": "^7.33.2",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.34.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"vite": "^5.0.8"
"vite": "^5.1.5"
}
}
Loading

0 comments on commit 33635b3

Please sign in to comment.