@ecmaos/jaffa 0.1.1
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/.vscode/extensions.json +3 -0
- package/CHANGELOG.md +8 -0
- package/LICENSE +7 -0
- package/README.md +21 -0
- package/index.html +14 -0
- package/package.json +32 -0
- package/src/main.ts +45 -0
- package/src/styles.css +12 -0
- package/src-tauri/Cargo.lock +4564 -0
- package/src-tauri/Cargo.toml +25 -0
- package/src-tauri/build.rs +3 -0
- package/src-tauri/capabilities/default.json +10 -0
- package/src-tauri/icons/128x128.png +0 -0
- package/src-tauri/icons/128x128@2x.png +0 -0
- package/src-tauri/icons/32x32.png +0 -0
- package/src-tauri/icons/Square107x107Logo.png +0 -0
- package/src-tauri/icons/Square142x142Logo.png +0 -0
- package/src-tauri/icons/Square150x150Logo.png +0 -0
- package/src-tauri/icons/Square284x284Logo.png +0 -0
- package/src-tauri/icons/Square30x30Logo.png +0 -0
- package/src-tauri/icons/Square310x310Logo.png +0 -0
- package/src-tauri/icons/Square44x44Logo.png +0 -0
- package/src-tauri/icons/Square71x71Logo.png +0 -0
- package/src-tauri/icons/Square89x89Logo.png +0 -0
- package/src-tauri/icons/StoreLogo.png +0 -0
- package/src-tauri/icons/icon.icns +0 -0
- package/src-tauri/icons/icon.ico +0 -0
- package/src-tauri/icons/icon.png +0 -0
- package/src-tauri/src/lib.rs +14 -0
- package/src-tauri/src/main.rs +6 -0
- package/src-tauri/tauri.conf.json +36 -0
- package/tsconfig.json +23 -0
- package/vite.config.ts +34 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "ecmaos-jaffa"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A Tauri App"
|
|
5
|
+
authors = ["you"]
|
|
6
|
+
edition = "2021"
|
|
7
|
+
|
|
8
|
+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
9
|
+
|
|
10
|
+
[lib]
|
|
11
|
+
# The `_lib` suffix may seem redundant but it is necessary
|
|
12
|
+
# to make the lib name unique and wouldn't conflict with the bin name.
|
|
13
|
+
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
|
|
14
|
+
name = "ecmaos_jaffa_lib"
|
|
15
|
+
crate-type = ["staticlib", "cdylib", "rlib"]
|
|
16
|
+
|
|
17
|
+
[build-dependencies]
|
|
18
|
+
tauri-build = { version = "2", features = [] }
|
|
19
|
+
|
|
20
|
+
[dependencies]
|
|
21
|
+
tauri = { version = "2", features = [] }
|
|
22
|
+
tauri-plugin-shell = "2"
|
|
23
|
+
serde = { version = "1", features = ["derive"] }
|
|
24
|
+
serde_json = "1"
|
|
25
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
|
2
|
+
#[tauri::command]
|
|
3
|
+
fn greet(name: &str) -> String {
|
|
4
|
+
format!("Hello, {}! You've been greeted from Rust!", name)
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
|
8
|
+
pub fn run() {
|
|
9
|
+
tauri::Builder::default()
|
|
10
|
+
.plugin(tauri_plugin_shell::init())
|
|
11
|
+
.invoke_handler(tauri::generate_handler![greet])
|
|
12
|
+
.run(tauri::generate_context!())
|
|
13
|
+
.expect("error while running tauri application");
|
|
14
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schema.tauri.app/config/2",
|
|
3
|
+
"productName": "ecmaos-jaffa",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"identifier": "com.ecmaos-jaffa.app",
|
|
6
|
+
"build": {
|
|
7
|
+
"beforeDevCommand": "pnpm dev",
|
|
8
|
+
"devUrl": "http://localhost:30888",
|
|
9
|
+
"beforeBuildCommand": "pnpm build",
|
|
10
|
+
"frontendDist": "../dist"
|
|
11
|
+
},
|
|
12
|
+
"app": {
|
|
13
|
+
"withGlobalTauri": true,
|
|
14
|
+
"windows": [
|
|
15
|
+
{
|
|
16
|
+
"title": "ecmaos-jaffa",
|
|
17
|
+
"width": 1024,
|
|
18
|
+
"height": 768
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"security": {
|
|
22
|
+
"csp": null
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"bundle": {
|
|
26
|
+
"active": true,
|
|
27
|
+
"targets": "all",
|
|
28
|
+
"icon": [
|
|
29
|
+
"icons/32x32.png",
|
|
30
|
+
"icons/128x128.png",
|
|
31
|
+
"icons/128x128@2x.png",
|
|
32
|
+
"icons/icon.icns",
|
|
33
|
+
"icons/icon.ico"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"include": ["src"],
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "ES2020",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
|
|
10
|
+
/* Bundler mode */
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"allowImportingTsExtensions": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
|
|
17
|
+
/* Linting */
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"noFallthroughCasesInSwitch": true
|
|
22
|
+
}
|
|
23
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineConfig } from "vite"
|
|
2
|
+
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
|
3
|
+
import i18nextLoader from 'vite-plugin-i18next-loader'
|
|
4
|
+
|
|
5
|
+
const host = process.env.TAURI_DEV_HOST
|
|
6
|
+
|
|
7
|
+
// https://vitejs.dev/config/
|
|
8
|
+
export default defineConfig(async () => ({
|
|
9
|
+
plugins: [
|
|
10
|
+
nodePolyfills({ include: ['module', 'os', 'path'] }),
|
|
11
|
+
i18nextLoader({ namespaceResolution: 'basename', paths: ['locales'] })
|
|
12
|
+
],
|
|
13
|
+
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
|
14
|
+
//
|
|
15
|
+
// 1. prevent vite from obscuring rust errors
|
|
16
|
+
clearScreen: false,
|
|
17
|
+
// 2. tauri expects a fixed port, fail if that port is not available
|
|
18
|
+
server: {
|
|
19
|
+
port: 30888,
|
|
20
|
+
strictPort: true,
|
|
21
|
+
host: host || false,
|
|
22
|
+
hmr: host
|
|
23
|
+
? {
|
|
24
|
+
protocol: "ws",
|
|
25
|
+
host,
|
|
26
|
+
port: 30888
|
|
27
|
+
}
|
|
28
|
+
: undefined,
|
|
29
|
+
watch: {
|
|
30
|
+
// 3. tell vite to ignore watching `src-tauri`
|
|
31
|
+
ignored: ["**/src-tauri/**"]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}))
|