create-qauri 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +95 -0
- package/dist/index.mjs +744 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +52 -0
- package/templates/base/README.md.tmpl +22 -0
- package/templates/base/gitignore.tmpl +33 -0
- package/templates/config/qauri.config.json.tmpl +31 -0
- package/templates/frontend/react/index.html +12 -0
- package/templates/frontend/react/package.json.tmpl +20 -0
- package/templates/frontend/react/src/App.css +32 -0
- package/templates/frontend/react/src/App.jsx +17 -0
- package/templates/frontend/react/src/main.jsx +10 -0
- package/templates/frontend/react/vite.config.js +10 -0
- package/templates/frontend/react-ts/index.html +12 -0
- package/templates/frontend/react-ts/package.json.tmpl +23 -0
- package/templates/frontend/react-ts/src/App.css +32 -0
- package/templates/frontend/react-ts/src/App.tsx +17 -0
- package/templates/frontend/react-ts/src/main.tsx +10 -0
- package/templates/frontend/react-ts/tsconfig.json +15 -0
- package/templates/frontend/react-ts/vite.config.ts +10 -0
- package/templates/frontend/svelte/index.html +12 -0
- package/templates/frontend/svelte/package.json.tmpl +19 -0
- package/templates/frontend/svelte/src/App.svelte +46 -0
- package/templates/frontend/svelte/src/main.js +7 -0
- package/templates/frontend/svelte/vite.config.js +10 -0
- package/templates/frontend/svelte-ts/index.html +12 -0
- package/templates/frontend/svelte-ts/package.json.tmpl +22 -0
- package/templates/frontend/svelte-ts/src/App.svelte +46 -0
- package/templates/frontend/svelte-ts/src/main.ts +7 -0
- package/templates/frontend/svelte-ts/svelte.config.js +5 -0
- package/templates/frontend/svelte-ts/tsconfig.json +14 -0
- package/templates/frontend/svelte-ts/vite.config.ts +10 -0
- package/templates/frontend/vanilla/index.html +16 -0
- package/templates/frontend/vanilla/main.js +6 -0
- package/templates/frontend/vanilla/package.json.tmpl +17 -0
- package/templates/frontend/vanilla/style.css +25 -0
- package/templates/frontend/vanilla-ts/index.html +13 -0
- package/templates/frontend/vanilla-ts/main.ts +8 -0
- package/templates/frontend/vanilla-ts/package.json.tmpl +18 -0
- package/templates/frontend/vanilla-ts/style.css +25 -0
- package/templates/frontend/vanilla-ts/tsconfig.json +14 -0
- package/templates/frontend/vanilla-ts/vite.config.ts +8 -0
- package/templates/frontend/vue/index.html +12 -0
- package/templates/frontend/vue/package.json.tmpl +19 -0
- package/templates/frontend/vue/src/App.vue +48 -0
- package/templates/frontend/vue/src/main.js +4 -0
- package/templates/frontend/vue/vite.config.js +10 -0
- package/templates/frontend/vue-ts/index.html +12 -0
- package/templates/frontend/vue-ts/package.json.tmpl +21 -0
- package/templates/frontend/vue-ts/src/App.vue +48 -0
- package/templates/frontend/vue-ts/src/main.ts +4 -0
- package/templates/frontend/vue-ts/tsconfig.json +15 -0
- package/templates/frontend/vue-ts/vite.config.ts +10 -0
- package/templates/native/cpp/CMakeLists.txt.tmpl +16 -0
- package/templates/native/cpp/main.cpp.tmpl +24 -0
- package/templates/native/python/main.py.tmpl +19 -0
- package/templates/native/python/pyproject.toml.tmpl +8 -0
- package/templates/native/python/requirements.txt.tmpl +2 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let count: number = 0;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<main class="app">
|
|
6
|
+
<h1>Welcome to Qauri + Svelte</h1>
|
|
7
|
+
<button on:click={() => count++}>
|
|
8
|
+
count is {count}
|
|
9
|
+
</button>
|
|
10
|
+
<p>Edit <code>src/App.svelte</code> and save to reload.</p>
|
|
11
|
+
</main>
|
|
12
|
+
|
|
13
|
+
<style>
|
|
14
|
+
:global(:root) {
|
|
15
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
16
|
+
color: #213547;
|
|
17
|
+
background-color: #ffffff;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.app {
|
|
21
|
+
max-width: 1280px;
|
|
22
|
+
margin: 0 auto;
|
|
23
|
+
padding: 2rem;
|
|
24
|
+
text-align: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
h1 {
|
|
28
|
+
font-size: 2.4em;
|
|
29
|
+
line-height: 1.1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
button {
|
|
33
|
+
border-radius: 8px;
|
|
34
|
+
border: 1px solid transparent;
|
|
35
|
+
padding: 0.6em 1.2em;
|
|
36
|
+
font-size: 1em;
|
|
37
|
+
font-weight: 500;
|
|
38
|
+
font-family: inherit;
|
|
39
|
+
background-color: #f9f9f9;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
button:hover {
|
|
44
|
+
border-color: #646cff;
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@tsconfig/svelte/tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"resolveJsonModule": true,
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"checkJs": true,
|
|
10
|
+
"isolatedModules": true
|
|
11
|
+
},
|
|
12
|
+
"include": ["src/**/*.ts", "src/**/*.svelte"],
|
|
13
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Qauri App</title>
|
|
7
|
+
<link rel="stylesheet" href="/style.css" />
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app">
|
|
11
|
+
<h1>Welcome to Qauri</h1>
|
|
12
|
+
<p>Edit <code>main.js</code> and save to reload.</p>
|
|
13
|
+
</div>
|
|
14
|
+
<script type="module" src="/main.js"></script>
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@qauri/api": "^0.1.0"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"vite": "^6.0.0"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
color: #213547;
|
|
4
|
+
background-color: #ffffff;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
margin: 0;
|
|
9
|
+
display: flex;
|
|
10
|
+
place-items: center;
|
|
11
|
+
min-width: 320px;
|
|
12
|
+
min-height: 100vh;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
#app {
|
|
16
|
+
max-width: 1280px;
|
|
17
|
+
margin: 0 auto;
|
|
18
|
+
padding: 2rem;
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
h1 {
|
|
23
|
+
font-size: 2.4em;
|
|
24
|
+
line-height: 1.1;
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Qauri App</title>
|
|
7
|
+
<link rel="stylesheet" href="/style.css" />
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
<script type="module" src="/main.ts"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc && vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@qauri/api": "^0.1.0"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"typescript": "^5.6.0",
|
|
16
|
+
"vite": "^6.0.0"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
color: #213547;
|
|
4
|
+
background-color: #ffffff;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
margin: 0;
|
|
9
|
+
display: flex;
|
|
10
|
+
place-items: center;
|
|
11
|
+
min-width: 320px;
|
|
12
|
+
min-height: 100vh;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
#app {
|
|
16
|
+
max-width: 1280px;
|
|
17
|
+
margin: 0 auto;
|
|
18
|
+
padding: 2rem;
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
h1 {
|
|
23
|
+
font-size: 2.4em;
|
|
24
|
+
line-height: 1.1;
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"noEmit": true,
|
|
11
|
+
"strict": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["*.ts"]
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Qauri App</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="app"></div>
|
|
10
|
+
<script type="module" src="/src/main.js"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@qauri/api": "^0.1.0",
|
|
13
|
+
"vue": "^3.5.0"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@vitejs/plugin-vue": "^5.2.0",
|
|
17
|
+
"vite": "^6.0.0"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
const count = ref(0);
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="app">
|
|
9
|
+
<h1>Welcome to Qauri + Vue</h1>
|
|
10
|
+
<button @click="count++">count is {{ count }}</button>
|
|
11
|
+
<p>Edit <code>src/App.vue</code> and save to reload.</p>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<style>
|
|
16
|
+
:root {
|
|
17
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
18
|
+
color: #213547;
|
|
19
|
+
background-color: #ffffff;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.app {
|
|
23
|
+
max-width: 1280px;
|
|
24
|
+
margin: 0 auto;
|
|
25
|
+
padding: 2rem;
|
|
26
|
+
text-align: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
h1 {
|
|
30
|
+
font-size: 2.4em;
|
|
31
|
+
line-height: 1.1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
button {
|
|
35
|
+
border-radius: 8px;
|
|
36
|
+
border: 1px solid transparent;
|
|
37
|
+
padding: 0.6em 1.2em;
|
|
38
|
+
font-size: 1em;
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
font-family: inherit;
|
|
41
|
+
background-color: #f9f9f9;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
button:hover {
|
|
46
|
+
border-color: #646cff;
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Qauri App</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="app"></div>
|
|
10
|
+
<script type="module" src="/src/main.ts"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vue-tsc -b && vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@qauri/api": "^0.1.0",
|
|
13
|
+
"vue": "^3.5.0"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@vitejs/plugin-vue": "^5.2.0",
|
|
17
|
+
"typescript": "^5.6.0",
|
|
18
|
+
"vite": "^6.0.0",
|
|
19
|
+
"vue-tsc": "^2.2.0"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
const count = ref(0);
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="app">
|
|
9
|
+
<h1>Welcome to Qauri + Vue</h1>
|
|
10
|
+
<button @click="count++">count is {{ count }}</button>
|
|
11
|
+
<p>Edit <code>src/App.vue</code> and save to reload.</p>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<style>
|
|
16
|
+
:root {
|
|
17
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
18
|
+
color: #213547;
|
|
19
|
+
background-color: #ffffff;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.app {
|
|
23
|
+
max-width: 1280px;
|
|
24
|
+
margin: 0 auto;
|
|
25
|
+
padding: 2rem;
|
|
26
|
+
text-align: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
h1 {
|
|
30
|
+
font-size: 2.4em;
|
|
31
|
+
line-height: 1.1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
button {
|
|
35
|
+
border-radius: 8px;
|
|
36
|
+
border: 1px solid transparent;
|
|
37
|
+
padding: 0.6em 1.2em;
|
|
38
|
+
font-size: 1em;
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
font-family: inherit;
|
|
41
|
+
background-color: #f9f9f9;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
button:hover {
|
|
46
|
+
border-color: #646cff;
|
|
47
|
+
}
|
|
48
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"noEmit": true,
|
|
11
|
+
"jsx": "preserve",
|
|
12
|
+
"strict": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src/**/*.ts", "src/**/*.vue"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.20)
|
|
2
|
+
project({{projectName}} LANGUAGES CXX)
|
|
3
|
+
|
|
4
|
+
set(CMAKE_CXX_STANDARD 17)
|
|
5
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
6
|
+
set(CMAKE_AUTOMOC ON)
|
|
7
|
+
|
|
8
|
+
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
|
|
9
|
+
|
|
10
|
+
add_executable(${PROJECT_NAME} main.cpp)
|
|
11
|
+
|
|
12
|
+
target_link_libraries(${PROJECT_NAME} PRIVATE
|
|
13
|
+
Qt6::Core
|
|
14
|
+
Qt6::Widgets
|
|
15
|
+
qauri
|
|
16
|
+
)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#include <QApplication>
|
|
2
|
+
#include <qauri/QauriView.h>
|
|
3
|
+
#include <qauri/Config.h>
|
|
4
|
+
|
|
5
|
+
int main(int argc, char* argv[]) {
|
|
6
|
+
QApplication app(argc, argv);
|
|
7
|
+
|
|
8
|
+
// Load configuration
|
|
9
|
+
Qauri::Config::instance().initialize();
|
|
10
|
+
|
|
11
|
+
// Create the web view
|
|
12
|
+
auto* view = new Qauri::QauriView(Qauri::QauriView::BackendType::Auto);
|
|
13
|
+
view->setWindowTitle("{{projectName}}");
|
|
14
|
+
view->resize(800, 600);
|
|
15
|
+
|
|
16
|
+
// Load the frontend
|
|
17
|
+
QString url = Qauri::Config::instance().getResourceUrl();
|
|
18
|
+
view->loadUrl(url);
|
|
19
|
+
|
|
20
|
+
view->show();
|
|
21
|
+
|
|
22
|
+
int ret = app.exec();
|
|
23
|
+
return ret;
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
from PySide6.QtWidgets import QApplication
|
|
3
|
+
from pyqauri import QauriView, BackendType
|
|
4
|
+
|
|
5
|
+
def main():
|
|
6
|
+
app = QApplication(sys.argv)
|
|
7
|
+
|
|
8
|
+
view = QauriView(BackendType.Auto)
|
|
9
|
+
view.setWindowTitle("{{projectName}}")
|
|
10
|
+
view.resize(800, 600)
|
|
11
|
+
|
|
12
|
+
# In dev mode, connect to the Vite dev server
|
|
13
|
+
view.loadUrl("{{devServerUrl}}")
|
|
14
|
+
|
|
15
|
+
view.show()
|
|
16
|
+
sys.exit(app.exec())
|
|
17
|
+
|
|
18
|
+
if __name__ == "__main__":
|
|
19
|
+
main()
|