diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-10-27 17:15:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-27 17:15:55 +0200 |
| commit | c4cfb6f6e0507f335fd88935857f20e88c34abd0 (patch) | |
| tree | 8dad74b6a213bb294dbcea33ebab34a3be193e77 /opendc-web/opendc-web-ui/build.gradle.kts | |
| parent | fa7fdbb0126ea465130961dc37c4ef2d6feb36e9 (diff) | |
| parent | 5a3d5148a9d52487f102e52bd079006c916075c9 (diff) | |
merge: Update to Next.js 13 and React 18
This pull request updates the web interface to make use of Next.js 13 and React 18.
## Implementation Notes :hammer_and_pick:
* Drop dependency on FontAwesome
* Update to Next 13 and React 18
* Drop dependency on Roboto font
* Make root redirect non-permanent
* Do not optimize images for export
* Update to Node 18 for the build process
* Ensure consistency of build tasks
* Update README.md of web UI
* Default to anonymous auth domain
* Disable configuration of basePath
## External Dependencies :four_leaf_clover:
* Next.js 13
* React 18
* PatternFly 4
* Node 18
## Breaking API Changes :warning:
* The base path of the web UI cannot be configured anymore via the Quarkus extension.
The previous implementation relied on Next.js internals and this functionality cannot be
provided without resorting to hacks. Since this functionality was not actually used, we have
removed it for now.
Diffstat (limited to 'opendc-web/opendc-web-ui/build.gradle.kts')
| -rw-r--r-- | opendc-web/opendc-web-ui/build.gradle.kts | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/opendc-web/opendc-web-ui/build.gradle.kts b/opendc-web/opendc-web-ui/build.gradle.kts index 5e999359..79160a2e 100644 --- a/opendc-web/opendc-web-ui/build.gradle.kts +++ b/opendc-web/opendc-web-ui/build.gradle.kts @@ -25,7 +25,7 @@ import com.github.gradle.node.npm.task.NpmTask description = "Web interface for OpenDC" plugins { - `java-library-conventions` + `java-conventions` id("com.github.node-gradle.node") } @@ -40,9 +40,13 @@ sourceSets { node { download.set(true) + version.set(libs.versions.node.get()) } -val formatTask = tasks.register<NpmTask>("format") { +val formatTask = tasks.register<NpmTask>("prettierFormat") { + group = "formatting" + description = "Use Prettier to format the JavaScript codebase" + args.set(listOf("run", "format")) dependsOn(tasks.npmInstall) inputs.dir("src") @@ -50,7 +54,10 @@ val formatTask = tasks.register<NpmTask>("format") { outputs.upToDateWhen { true } } -val lintTask = tasks.register<NpmTask>("lint") { +val lintTask = tasks.register<NpmTask>("nextLint") { + group = "verification" + description = "Use ESLint to check for problems" + args.set(listOf("run", "lint")) dependsOn(tasks.npmInstall) inputs.dir("src") @@ -58,7 +65,10 @@ val lintTask = tasks.register<NpmTask>("lint") { outputs.upToDateWhen { true } } -tasks.register<NpmTask>("dev") { +tasks.register<NpmTask>("nextDev") { + group = "build" + description = "Run the Next.js project in development mode" + args.set(listOf("run", "dev")) dependsOn(tasks.npmInstall) inputs.dir(project.fileTree("src")) @@ -67,11 +77,13 @@ tasks.register<NpmTask>("dev") { outputs.upToDateWhen { true } } -val buildTask = tasks.register<NpmTask>("buildNext") { +val buildTask = tasks.register<NpmTask>("nextBuild") { + group = "build" + description = "Build the Next.js project" + args.set(listOf("run", "build")) val env = listOf( - "NEXT_BASE_PATH", "NEXT_PUBLIC_API_BASE_URL", "NEXT_PUBLIC_SENTRY_DSN", "NEXT_PUBLIC_AUTH0_DOMAIN", @@ -89,7 +101,10 @@ val buildTask = tasks.register<NpmTask>("buildNext") { outputs.dir(layout.buildDirectory.dir("next")) } -tasks.register<NpmTask>("start") { +tasks.register<NpmTask>("nextStart") { + group = "build" + description = "Build the Next.js project" + args.set(listOf("run", "start")) dependsOn(buildTask) |
