-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from ia3andy/codestart
Codestart
- Loading branch information
Showing
8 changed files
with
132 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
integration-tests/src/test/java/io/quarkiverse/qute/web/it/QuteWebCodestartTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package io.quarkiverse.qute.web.it; | ||
|
||
import static io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartCatalog.Language.JAVA; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.devtools.testing.codestarts.QuarkusCodestartTest; | ||
|
||
public class QuteWebCodestartTest { | ||
|
||
@RegisterExtension | ||
public static QuarkusCodestartTest codestartTest = QuarkusCodestartTest.builder() | ||
.setupStandaloneExtensionTest("io.quarkiverse.qute.web:quarkus-qute-web") | ||
.languages(JAVA) | ||
.build(); | ||
|
||
@Test | ||
void testContent() throws Throwable { | ||
codestartTest.assertThatGeneratedFileMatchSnapshot(JAVA, "src/main/resources/templates/pub/some-page.html"); | ||
} | ||
|
||
@Test | ||
void buildAllProjectsForLocalUse() throws Throwable { | ||
codestartTest.buildAllProjects(); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...pshots__/QuteWebCodestartTest/testContent/src_main_resources_templates_pub_some-page.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{#let name=http:param('name', 'Qute')} | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Hello {name}</title> | ||
<style> | ||
body { | ||
background-color: #000; | ||
color: #fff; | ||
} | ||
h1 { | ||
color: #4695EB; | ||
font-size: 6vw; | ||
} | ||
|
||
h1 b { | ||
color: #be9100; | ||
} | ||
|
||
p { | ||
font-size: 2vw; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Hello <b>{name}</b></h1> | ||
|
||
<p>Create your Web page using Quarkus & Qute</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
runtime/src/main/codestarts/quarkus/qute-web-codestart/base/README.tpl.qute.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{#include readme-header /} |
31 changes: 31 additions & 0 deletions
31
...odestarts/quarkus/qute-web-codestart/base/src/main/resources/templates/pub/some-page.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{#let name=http:param('name', 'Qute')} | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Hello {name}</title> | ||
<style> | ||
body { | ||
background-color: #000; | ||
color: #fff; | ||
} | ||
h1 { | ||
color: #4695EB; | ||
font-size: 6vw; | ||
} | ||
|
||
h1 b { | ||
color: #be9100; | ||
} | ||
|
||
p { | ||
font-size: 2vw; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Hello <b>{name}</b></h1> | ||
|
||
<p>Create your Web page using Quarkus & Qute</p> | ||
</body> | ||
</html> |
9 changes: 9 additions & 0 deletions
9
runtime/src/main/codestarts/quarkus/qute-web-codestart/codestart.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: qute-web-codestart | ||
ref: qute-web | ||
tags: extension-codestart | ||
type: code | ||
metadata: | ||
title: Qute Web | ||
description: Create your web page using Quarkus and Qute | ||
path: /some-page | ||
related-guide-section: https://quarkus.io/guides/qute#type-safe-templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters