Skip to content

Commit

Permalink
Docs: heading for Config Reference align properly (quarkiverse#557)
Browse files Browse the repository at this point in the history
Refractor: NuxtFramework

Refractor: NuxtFramework

Update NuxtFramework.java
  • Loading branch information
shivam-sharma7 committed Oct 23, 2023
1 parent 7c31e76 commit c1e34a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,23 @@ public class NuxtFramework extends GenericFramework {
public NuxtFramework() {
super("dist", "dev", 3000);
}

@Override
public QuinoaConfig override(QuinoaConfig delegate, Optional<JsonObject> packageJson,
Optional<String> detectedDevScript,
@Override
public QuinoaConfig override(QuinoaConfig delegate, Optional<JsonObject> packageJson, Optional<String> detectedDevScript,
boolean isCustomized) {
if (delegate.packageManagerCommand().build().equals("run build") && packageJson.isPresent()) {
JsonObject scripts = packageJson.get().getJsonObject("scripts");
if (scripts != null) {
if (scripts.getString("build") == null) {
LOG.warn(
"Make sure you define \"build\": \"nuxt build \", in the package.json to make Nuxt work with Quinoa.");
}
}
}

return new QuinoaConfigDelegate(super.override(delegate, packageJson, detectedDevScript, isCustomized)) {

@Override
public DevServerConfig devServer() {
return new DevServerConfigDelegate(super.devServer()) {
public PackageManagerCommandConfig packageManagerCommand() {
return new PackageManagerCommandConfigDelegate(super.packageManagerCommand()) {
@Override
public Optional<String> indexPage() {
// In Dev mode Nuxt serves everything out of root "/" but in PRD mode its the
// normal "/index.html".
return Optional.of(super.indexPage().orElse("/"));
public Map<String, String> devEnv() {
// BROWSER=NONE so the browser is not automatically opened with React
Map<String, String> envs = new HashMap<>(super.testEnv());
envs.put("BROWSER", "NONE");
return envs;
}
};
}
};

}
}
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/config-reference.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= Quarkus image:logo.svg[width=25em] Quinoa - Configuration Reference
= Quarkus Quinoa - Configuration Reference

include::./includes/attributes.adoc[]

Expand Down

0 comments on commit c1e34a9

Please sign in to comment.