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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +95 -0
  3. package/dist/index.mjs +744 -0
  4. package/dist/index.mjs.map +1 -0
  5. package/package.json +52 -0
  6. package/templates/base/README.md.tmpl +22 -0
  7. package/templates/base/gitignore.tmpl +33 -0
  8. package/templates/config/qauri.config.json.tmpl +31 -0
  9. package/templates/frontend/react/index.html +12 -0
  10. package/templates/frontend/react/package.json.tmpl +20 -0
  11. package/templates/frontend/react/src/App.css +32 -0
  12. package/templates/frontend/react/src/App.jsx +17 -0
  13. package/templates/frontend/react/src/main.jsx +10 -0
  14. package/templates/frontend/react/vite.config.js +10 -0
  15. package/templates/frontend/react-ts/index.html +12 -0
  16. package/templates/frontend/react-ts/package.json.tmpl +23 -0
  17. package/templates/frontend/react-ts/src/App.css +32 -0
  18. package/templates/frontend/react-ts/src/App.tsx +17 -0
  19. package/templates/frontend/react-ts/src/main.tsx +10 -0
  20. package/templates/frontend/react-ts/tsconfig.json +15 -0
  21. package/templates/frontend/react-ts/vite.config.ts +10 -0
  22. package/templates/frontend/svelte/index.html +12 -0
  23. package/templates/frontend/svelte/package.json.tmpl +19 -0
  24. package/templates/frontend/svelte/src/App.svelte +46 -0
  25. package/templates/frontend/svelte/src/main.js +7 -0
  26. package/templates/frontend/svelte/vite.config.js +10 -0
  27. package/templates/frontend/svelte-ts/index.html +12 -0
  28. package/templates/frontend/svelte-ts/package.json.tmpl +22 -0
  29. package/templates/frontend/svelte-ts/src/App.svelte +46 -0
  30. package/templates/frontend/svelte-ts/src/main.ts +7 -0
  31. package/templates/frontend/svelte-ts/svelte.config.js +5 -0
  32. package/templates/frontend/svelte-ts/tsconfig.json +14 -0
  33. package/templates/frontend/svelte-ts/vite.config.ts +10 -0
  34. package/templates/frontend/vanilla/index.html +16 -0
  35. package/templates/frontend/vanilla/main.js +6 -0
  36. package/templates/frontend/vanilla/package.json.tmpl +17 -0
  37. package/templates/frontend/vanilla/style.css +25 -0
  38. package/templates/frontend/vanilla-ts/index.html +13 -0
  39. package/templates/frontend/vanilla-ts/main.ts +8 -0
  40. package/templates/frontend/vanilla-ts/package.json.tmpl +18 -0
  41. package/templates/frontend/vanilla-ts/style.css +25 -0
  42. package/templates/frontend/vanilla-ts/tsconfig.json +14 -0
  43. package/templates/frontend/vanilla-ts/vite.config.ts +8 -0
  44. package/templates/frontend/vue/index.html +12 -0
  45. package/templates/frontend/vue/package.json.tmpl +19 -0
  46. package/templates/frontend/vue/src/App.vue +48 -0
  47. package/templates/frontend/vue/src/main.js +4 -0
  48. package/templates/frontend/vue/vite.config.js +10 -0
  49. package/templates/frontend/vue-ts/index.html +12 -0
  50. package/templates/frontend/vue-ts/package.json.tmpl +21 -0
  51. package/templates/frontend/vue-ts/src/App.vue +48 -0
  52. package/templates/frontend/vue-ts/src/main.ts +4 -0
  53. package/templates/frontend/vue-ts/tsconfig.json +15 -0
  54. package/templates/frontend/vue-ts/vite.config.ts +10 -0
  55. package/templates/native/cpp/CMakeLists.txt.tmpl +16 -0
  56. package/templates/native/cpp/main.cpp.tmpl +24 -0
  57. package/templates/native/python/main.py.tmpl +19 -0
  58. package/templates/native/python/pyproject.toml.tmpl +8 -0
  59. 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,7 @@
1
+ import App from './App.svelte';
2
+
3
+ const app = new App({
4
+ target: document.getElementById('app')!,
5
+ });
6
+
7
+ export default app;
@@ -0,0 +1,5 @@
1
+ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
2
+
3
+ export default {
4
+ preprocess: vitePreprocess(),
5
+ };
@@ -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,10 @@
1
+ import { defineConfig } from 'vite';
2
+ import { svelte } from '@sveltejs/vite-plugin-svelte';
3
+
4
+ export default defineConfig({
5
+ plugins: [svelte()],
6
+ server: {
7
+ port: 5173,
8
+ strictPort: true,
9
+ },
10
+ });
@@ -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,6 @@
1
+ import { invoke } from '@qauri/api';
2
+
3
+ document.querySelector('#app').innerHTML = `
4
+ <h1>Welcome to Qauri</h1>
5
+ <p>Edit <code>main.js</code> and save to reload.</p>
6
+ `;
@@ -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,8 @@
1
+ import { invoke } from '@qauri/api';
2
+
3
+ const app = document.querySelector<HTMLDivElement>('#app')!;
4
+
5
+ app.innerHTML = `
6
+ <h1>Welcome to Qauri</h1>
7
+ <p>Edit <code>main.ts</code> and save to reload.</p>
8
+ `;
@@ -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,8 @@
1
+ import { defineConfig } from 'vite';
2
+
3
+ export default defineConfig({
4
+ server: {
5
+ port: 5173,
6
+ strictPort: true,
7
+ },
8
+ });
@@ -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,4 @@
1
+ import { createApp } from 'vue';
2
+ import App from './App.vue';
3
+
4
+ createApp(App).mount('#app');
@@ -0,0 +1,10 @@
1
+ import { defineConfig } from 'vite';
2
+ import vue from '@vitejs/plugin-vue';
3
+
4
+ export default defineConfig({
5
+ plugins: [vue()],
6
+ server: {
7
+ port: 5173,
8
+ strictPort: true,
9
+ },
10
+ });
@@ -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,4 @@
1
+ import { createApp } from 'vue';
2
+ import App from './App.vue';
3
+
4
+ createApp(App).mount('#app');
@@ -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,10 @@
1
+ import { defineConfig } from 'vite';
2
+ import vue from '@vitejs/plugin-vue';
3
+
4
+ export default defineConfig({
5
+ plugins: [vue()],
6
+ server: {
7
+ port: 5173,
8
+ strictPort: true,
9
+ },
10
+ });
@@ -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()
@@ -0,0 +1,8 @@
1
+ [project]
2
+ name = "{{projectName}}"
3
+ version = "0.1.0"
4
+ requires-python = ">=3.10"
5
+ dependencies = [
6
+ "PySide6>=6.5.0",
7
+ "pyqauri>=0.1.0",
8
+ ]
@@ -0,0 +1,2 @@
1
+ PySide6>=6.5.0
2
+ pyqauri>=0.1.0