Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore: make app detected as Hilla in use #3219

Merged
merged 4 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createBrowserRouter, RouteObject } from 'react-router-dom';
import { serverSideRoutes } from "Frontend/generated/flow/Flow";

export const routes = [
{ },
...serverSideRoutes
] as RouteObject[];

Expand Down
43 changes: 1 addition & 42 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- tag::vaadin-version[] -->
<vaadin.version>24.4.0.alpha4</vaadin.version>
<vaadin.version>24.4.0.alpha5</vaadin.version>
<!-- end::vaadin-version[] -->

<drivers.dir>${project.basedir}/drivers</drivers.dir>
Expand Down Expand Up @@ -207,47 +207,6 @@
<lineEnding>LF</lineEnding>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<id>update-hilla-react-dependencies</id>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>
// "com.vaadin:hilla-lit" provides WC npm dependencies, and
// "com.vaadin:hilla-react" provides React ones, and they
// don't combine. But we need both in the docs project.
// Since this project depends on "com.vaadin:hilla-lit",
// the following workaround adds the Hilla React npm
// packages.
def hillaReactNpmPackages = [
'@vaadin/hilla-react-auth',
'@vaadin/hilla-react-form',
'@vaadin/hilla-react-crud',
]
def hillaVersion = project.properties.getProperty('vaadin.version')
def hillaVersionNpm = hillaVersion.replaceAll(~/(\d+\.\d+\.\d+)\.(\w+)/, '$1-$2')
def packageJsonFile = new File(project.file.getParentFile(), 'package.json')
def packageJson = new groovy.json.JsonSlurper().parse(packageJsonFile)
for (npmPackage in hillaReactNpmPackages) {
packageJson.get('dependencies').put(npmPackage, hillaVersionNpm)
}
def outputPackageJson = groovy.json.JsonOutput.toJson(packageJson)
outputPackageJson = groovy.json.JsonOutput.prettyPrint(outputPackageJson)
outputPackageJson = outputPackageJson.replaceAll(~/(?m:^|\G) /, ' ')
packageJsonFile.write(outputPackageJson)
</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
Loading