Skip to content

Commit

Permalink
Fix quarkiverse#729: Simplify and fix Vite Code Start
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jul 24, 2024
1 parent da39f2d commit e7eebc4
Show file tree
Hide file tree
Showing 16 changed files with 882 additions and 949 deletions.
2 changes: 1 addition & 1 deletion deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-server-spi-deployment</artifactId>
<artifactId>quarkus-rest-server-spi-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/includes/attributes.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:quarkus-version: 3.12.0
:quarkus-quinoa-version: 2.4.2
:quarkus-quinoa-version: 2.4.3
:maven-version: 3.8.1+
:extension-status: stable

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
<artifactId>quarkus-rest</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.quinoa</groupId>
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/src/main/ui-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"packageManager": "[email protected]+sha512.2dc70be5fce9f66756d25b00a888f3ca66f86b502b76750e72ba54cec89da767b938c54124595e26f868825688e0fe3552c26c76a330673343057acadd5cfcf2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ void testBuild() throws Throwable {
codestartTest.buildAllProjects();
}

}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/
counter.js
index.html
main.js
package-lock.json
package.json
public/
public/quarkus.svg
public/vite.svg
quinoa.css
quinoa.html
vite.config.js
style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export function setupCounter(element) {
let counter = 0
const setCounter = (count) => {
counter = count
element.innerHTML = `count is ${counter}`
}
element.addEventListener('click', () => setCounter(counter + 1))
setCounter(0)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Quinoa App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/main.js"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
import theaterJS from 'theaterjs';
import './style.css'
import quarkusLogo from '/quarkus.svg'
import viteLogo from '/vite.svg'
import { setupCounter } from './counter.js'

const theater = theaterJS();
document.querySelector('#app').innerHTML = `
<div>
<a href="https://vitejs.dev" target="_blank">
<img src="${viteLogo}" class="logo" alt="Vite logo" />
</a>
<a href="https://docs.quarkiverse.io/quarkus-quinoa/dev/web-frameworks.html" target="_blank">
<img src="${quarkusLogo}" class="logo vanilla" alt="Quarkus logo" />
</a>
<h1>Hello Quinoa!</h1>
<div class="card">
<button id="counter" type="button"></button>
</div>
<p class="read-the-docs">
Quinoa is a Quarkus extension which eases the development, the build and serving of single page apps or web components (built with npm : React, Angular, Vue, Lit, Svelte, Astro, SolidJS …) alongside Quarkus. It is possible to use it with a Quarkus backend in a single project.
</p>
</div>
`

theater
.on('type:start, erase:start', function() { theater.getCurrentActor().$element.classList.add('actor-content--typing');})
.on('type:end, erase:end', function() {theater.getCurrentActor().$element.classList.remove('actor-content--typing');});

theater
.addActor('Quarkus', { speed: 1, accuracy: 0.7 })
.addActor('Me', { speed: 0.9, accuracy: 0.8 })
.addScene('Quarkus:Toc toc.', 1000)
.addScene('Me:What?', 500)
.addScene('Quarkus:You will eat Quinoa today!', 200)
.addScene('Me:Nooo...', -3, '!!! ', 150, 'No! ', 150)
.addScene('Me:Yuk! That\'s impossible!', 100)
.addScene('Quarkus:It is time!', 100)
.addScene('Quarkus:With your training and this power,', 100)
.addScene('Quarkus:You will create awesome web apps.', 100)
.addScene('Quarkus:It is your destiny!', 200)
.addScene('Quarkus:Meet Quarkus UI with NO hAssle!', 200)
.addScene('Me:Neat!', 200)
setupCounter(document.querySelector('#counter'))
Loading

0 comments on commit e7eebc4

Please sign in to comment.