Nuxtor v0.0.4

This commit is contained in:
Nicola Spadari
2024-08-04 11:51:30 +02:00
20 changed files with 5211 additions and 5218 deletions

View File

@@ -12,9 +12,9 @@ jobs:
fail-fast: false
matrix:
include:
- platform: macos-latest # for Arm based macs.
- platform: macos-latest # Arm based macs
args: --target aarch64-apple-darwin
- platform: macos-latest # for Intel based macs.
- platform: macos-latest # Intel based macs
args: --target x86_64-apple-darwin
- platform: ubuntu-22.04
args: ""
@@ -46,7 +46,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.4.0
version: 9.6.0
- name: install frontend dependencies
run: pnpm install
@@ -57,7 +57,7 @@ jobs:
with:
tagName: nuxtor-v__VERSION__
releaseName: Nuxtor v__VERSION__
releaseBody: After installing the Apple app you have to run "xattr -c /Applications/nuxtor.app" once before launching
releaseBody: After installing the Apple app you have to run "xattr -c /Applications/Nuxtor.app" once before launching
releaseDraft: false
prerelease: false
args: ${{ matrix.args }}

View File

@@ -2,6 +2,7 @@ export default defineNuxtConfig({
modules: [
"@vueuse/nuxt",
"@unocss/nuxt",
"@nuxt/icon",
"nuxt-svgo",
"@nuxt/eslint"
],
@@ -50,11 +51,6 @@ export default defineNuxtConfig({
}
}
},
vue: {
compilerOptions: {
isCustomElement: (tag: string) => tag.startsWith("i-")
}
},
srcDir: "src/",
ssr: false,
devServer: {
@@ -64,5 +60,6 @@ export default defineNuxtConfig({
config: {
standalone: false
}
}
},
compatibilityDate: "2024-08-01"
});

View File

@@ -1,10 +1,10 @@
{
"name": "nuxtor",
"type": "module",
"version": "0.0.3",
"version": "0.0.4",
"private": true,
"packageManager": "pnpm@9.4.0",
"description": "Starter template for Nuxt 3 with Tauri",
"packageManager": "pnpm@9.6.0",
"description": "Starter template for Nuxt 3 and Tauri 2",
"author": "Nicola Spadari",
"license": "MIT",
"engines": {
@@ -23,27 +23,26 @@
"tauri:build:debug": "tauri build --debug"
},
"dependencies": {
"@tauri-apps/api": ">=2.0.0-beta.14",
"@tauri-apps/plugin-fs": "2.0.0-beta.6",
"@tauri-apps/plugin-notification": "2.0.0-beta.6",
"@tauri-apps/plugin-os": "2.0.0-beta.6",
"@tauri-apps/plugin-shell": "2.0.0-beta.7"
"@tauri-apps/api": ">=2.0.0-rc.0",
"@tauri-apps/plugin-fs": "^2.0.0-rc.0",
"@tauri-apps/plugin-notification": "^2.0.0-rc.0",
"@tauri-apps/plugin-os": "^2.0.0-rc.0",
"@tauri-apps/plugin-shell": "^2.0.0-rc.0"
},
"devDependencies": {
"@antfu/eslint-config": "^2.21.2",
"@iconify-json/heroicons-solid": "^1.1.11",
"@nuxt/eslint": "^0.3.13",
"@tauri-apps/cli": ">=2.0.0-beta.21",
"@unocss/eslint-plugin": "^0.61.0",
"@unocss/nuxt": "^0.61.0",
"@antfu/eslint-config": "^2.24.1",
"@nuxt/eslint": "^0.4.0",
"@nuxt/icon": "^1.4.5",
"@tauri-apps/cli": ">=2.0.0-rc.1",
"@unocss/eslint-plugin": "^0.61.9",
"@unocss/nuxt": "^0.61.9",
"@vueuse/core": "^10.11.0",
"@vueuse/nuxt": "^10.11.0",
"bumpp": "^9.4.1",
"bumpp": "^9.4.2",
"eslint": "8.57.0",
"nuxt": "^3.12.3",
"nuxt-svgo": "^4.0.1",
"sass": "^1.77.6",
"typescript": "^5.5.3",
"unplugin-auto-import": "^0.17.6"
"nuxt": "^3.12.4",
"nuxt-svgo": "^4.0.2",
"sass": "^1.77.8",
"typescript": "^5.5.4"
}
}

2947
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

48
src-tauri/Cargo.lock generated
View File

@@ -3676,9 +3676,9 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f"
[[package]]
name = "tauri"
version = "2.0.0-beta.23"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68725c4f17f62f0fb1fa2eecaf391200bf00a9414c84f30783ddca10570690c3"
checksum = "255e746089a370802ec4eb896dccc6f27c1dd2a203c1dc484fd996db954e2300"
dependencies = [
"anyhow",
"bytes",
@@ -3725,9 +3725,9 @@ dependencies = [
[[package]]
name = "tauri-build"
version = "2.0.0-beta.18"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1822847744f663babbfc8b7532a104734e9cf99e3408bba7109018bf9177917"
checksum = "85ceb8d082c3b17b4b2eb134a39363a22c696ddba473d6e5c0ab1caadad4cfca"
dependencies = [
"anyhow",
"cargo_toml",
@@ -3747,9 +3747,9 @@ dependencies = [
[[package]]
name = "tauri-codegen"
version = "2.0.0-beta.18"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e36fa3c2e3bd935827fef1eed459885414fb27c82f687d8b9a15112c8a5c8f0"
checksum = "2407c7d37a491b16e530445c9611d91091cae198eea2ed424913b740215605f2"
dependencies = [
"base64 0.22.1",
"brotli",
@@ -3774,9 +3774,9 @@ dependencies = [
[[package]]
name = "tauri-macros"
version = "2.0.0-beta.18"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34aba4bed4648c3cb17d421af5783c7c29a033a94ab8597ef3791dadea69289d"
checksum = "d210893b693be00f569b4f54456803debe104b7675f368205f2b6e94bac09b34"
dependencies = [
"heck 0.5.0",
"proc-macro2",
@@ -3788,9 +3788,9 @@ dependencies = [
[[package]]
name = "tauri-plugin"
version = "2.0.0-beta.18"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "431ac9636bf81e7a04042399918ffa6b9d2413926dabc9366a24f6b487f64653"
checksum = "b352e4478af27bd7c76724bb426ebb32fc51baafb2186afabed4e706dc9e39d4"
dependencies = [
"anyhow",
"glob",
@@ -3805,9 +3805,9 @@ dependencies = [
[[package]]
name = "tauri-plugin-fs"
version = "2.0.0-beta.10"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17e1f9fb6054cbc48c9e0fda7e8c8aeaccddb4fe880163473555beeed580010e"
checksum = "5df6b25b1f2b7b61565e66c4dbee9eb39e5635d2a763206e380e07cc3f601a67"
dependencies = [
"anyhow",
"glob",
@@ -3824,9 +3824,9 @@ dependencies = [
[[package]]
name = "tauri-plugin-notification"
version = "2.0.0-beta.9"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4eef9166e4f50b295ef1fb5ad0c4039a34a215857bc3499bbb0586b438e88620"
checksum = "7e69aaabfb7720083862ea35de37d9ad71b9465249762462ced38c2c92690a9e"
dependencies = [
"log",
"notify-rust",
@@ -3843,9 +3843,9 @@ dependencies = [
[[package]]
name = "tauri-plugin-os"
version = "2.0.0-beta.7"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2946635d31de19ed4191f1c556da20d1257f4667a1bac03852d9bb4be9fa8ffa"
checksum = "6b54cfeb26356822d3be3db4282041b03552f573a694b6b28aded7d95c62a039"
dependencies = [
"gethostname",
"log",
@@ -3861,9 +3861,9 @@ dependencies = [
[[package]]
name = "tauri-plugin-shell"
version = "2.0.0-beta.8"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85f0347c4d056cca543b5f2dd74c33b64182553e03d1dba2738fe2a95f0ec9ef"
checksum = "9209f6c32caec61e156a5616f7d80ba7683ca4a0a5641cbe5d3086ab371aaab2"
dependencies = [
"encoding_rs",
"log",
@@ -3882,9 +3882,9 @@ dependencies = [
[[package]]
name = "tauri-runtime"
version = "2.0.0-beta.19"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5fa872242a432195b814e87f91ce10f293ae5b01fbd1eb139455496260aa7c9"
checksum = "6624fdf383ccafc9e8ad9205fe6e5c976b318efcd6b3662dde658c74e4254792"
dependencies = [
"dpi",
"gtk",
@@ -3901,9 +3901,9 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "2.0.0-beta.19"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ad6d5ef3c05d1c4b6cf97b9eac1ca1ad8ff2a7057ad0a92b3e4c476f009341e"
checksum = "9fd1a785c4281f8231b091593393b40cb3a800810c407b1ffed52de27ff1640a"
dependencies = [
"cocoa",
"gtk",
@@ -3925,9 +3925,9 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "2.0.0-beta.18"
version = "2.0.0-rc.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f81a672883c9a67eb24727c99cce583625c919a5fb696c661603b426c463c72"
checksum = "6f435eeaae1e69cf93cf19da0f727989eed2e5eb6fc63a8d21432f59dd3ac4ac"
dependencies = [
"brotli",
"cargo_metadata",

View File

@@ -1,7 +1,7 @@
[package]
name = "nuxtor"
version = "0.0.3"
description = "Starter template for Nuxt 3 with Tauri"
version = "0.0.4"
description = "Starter template for Nuxt 3 and Tauri 2"
authors = [ "NicolaSpadari" ]
license = "MIT"
repository = "https://github.com/NicolaSpadari/nuxtor"
@@ -16,18 +16,18 @@ crate-type = [
]
[build-dependencies.tauri-build]
version = "2.0.0-beta.18"
version = "2.0.0-rc.0"
features = [ ]
[dependencies]
tauri-plugin-shell = "2.0.0-beta.8"
tauri-plugin-notification = "2.0.0-beta.9"
tauri-plugin-os = "2.0.0-beta.7"
tauri-plugin-fs = "2.0.0-beta.10"
tauri-plugin-shell = "2.0.0-rc.0"
tauri-plugin-notification = "2.0.0-rc.0"
tauri-plugin-os = "2.0.0-rc.0"
tauri-plugin-fs = "2.0.0-rc.0"
serde_json = "1"
[dependencies.tauri]
version = "2.0.0-beta.23"
version = "2.0.0-rc.0"
features = [ ]
[dependencies.serde]

View File

@@ -6,12 +6,12 @@
"main"
],
"permissions": [
"path:default",
"event:default",
"window:default",
"app:default",
"resources:default",
"menu:default",
"core:path:default",
"core:event:default",
"core:window:default",
"core:app:default",
"core:resources:default",
"core:menu:default",
"shell:allow-open",
{
"identifier": "shell:allow-execute",

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
{"main":{"identifier":"main","description":"Capabilities for the main window","local":true,"windows":["main"],"permissions":["path:default","event:default","window:default","app:default","resources:default","menu:default","shell:allow-open",{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]},"notification:default","os:allow-platform","os:allow-arch","os:allow-family","os:allow-version","os:allow-locale","fs:allow-document-read","fs:allow-document-write"]}}
{"main":{"identifier":"main","description":"Capabilities for the main window","local":true,"windows":["main"],"permissions":["core:path:default","core:event:default","core:window:default","core:app:default","core:resources:default","core:menu:default","shell:allow-open",{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]},"notification:default","os:allow-platform","os:allow-arch","os:allow-family","os:allow-version","os:allow-locale","fs:allow-document-read","fs:allow-document-write"]}}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -32,7 +32,7 @@
"devUrl": "http://localhost:3000"
},
"productName": "Nuxtor",
"version": "0.0.3",
"version": "0.0.4",
"identifier": "com.nicolaspadari.nuxtor",
"plugins": {},
"app": {

View File

@@ -8,7 +8,7 @@
</div>
<div flex lg="hidden">
<button type="button" @click="showSidebar = true" inline-flex items-center justify-center rounded-md p-2.5 text-neutral-300 m="-2.5">
<i-heroicons-solid-bars-3 size-6 />
<Icon name="heroicons-solid:bars-3" size-6 />
</button>
</div>
<div hidden lg="flex gap-x-12">

View File

@@ -11,7 +11,7 @@
<SvgoLogo :filled="true" :font-controlled="false" size-8 />
</NuxtLink>
<button type="button" rounded-md p-2.5 text-neutral-300 m="2.5" @click="showSidebar = false">
<i-heroicons-solid-x-mark size-6 />
<Icon name="heroicons-solid:x-mark" size-6 />
</button>
</div>
<div mt-6 flow-root>

View File

@@ -1,6 +1,6 @@
const showSidebar = ref(false);
export const useSidebar = () => {
const showSidebar = useState("sidebar", () => false);
return {
showSidebar
};

View File

@@ -1,5 +1,4 @@
const { showSidebar } = useSidebar();
export default defineNuxtRouteMiddleware(() => {
const { showSidebar } = useSidebar();
showSidebar.value = false;
});

View File

@@ -9,6 +9,14 @@ const capitalize = (name: string) => {
return name.charAt(0).toUpperCase() + name.slice(1);
};
const tauriModules = [
{ module: tauriApp, prefix: "App", importPath: "@tauri-apps/api/app" },
{ module: tauriShell, prefix: "Shell", importPath: "@tauri-apps/plugin-shell" },
{ module: tauriOs, prefix: "Os", importPath: "@tauri-apps/plugin-os" },
{ module: tauriNotification, prefix: "Notification", importPath: "@tauri-apps/plugin-notification" },
{ module: tauriFs, prefix: "Fs", importPath: "@tauri-apps/plugin-fs" }
];
export default defineNuxtModule<ModuleOptions>({
meta: {
name: "nuxt-tauri",
@@ -18,30 +26,12 @@ export default defineNuxtModule<ModuleOptions>({
prefix: "useTauri"
},
setup(options) {
Object.keys(tauriApp).filter((name) => name !== "default").forEach((name) => {
const prefix = `${options.prefix}App` || "";
const as = prefix ? prefix + capitalize(name) : name;
addImports({ from: "@tauri-apps/api/app", name, as });
});
Object.keys(tauriShell).filter((name) => name !== "default").forEach((name) => {
const prefix = `${options.prefix}Shell` || "";
const as = prefix ? prefix + capitalize(name) : name;
addImports({ from: "@tauri-apps/plugin-shell", name, as });
});
Object.keys(tauriOs).filter((name) => name !== "default").forEach((name) => {
const prefix = `${options.prefix}Os` || "";
const as = prefix ? prefix + capitalize(name) : name;
addImports({ from: "@tauri-apps/plugin-os", name, as });
});
Object.keys(tauriNotification).filter((name) => name !== "default").forEach((name) => {
const prefix = `${options.prefix}Notification` || "";
const as = prefix ? prefix + capitalize(name) : name;
addImports({ from: "@tauri-apps/plugin-notification", name, as });
});
Object.keys(tauriFs).filter((name) => name !== "default").forEach((name) => {
const prefix = `${options.prefix}Fs` || "";
const as = prefix ? prefix + capitalize(name) : name;
addImports({ from: "@tauri-apps/plugin-fs", name, as });
tauriModules.forEach(({ module, prefix, importPath }) => {
Object.keys(module).filter((name) => name !== "default").forEach((name) => {
const prefixedName = `${options.prefix}${prefix}` || "";
const as = prefixedName ? prefixedName + capitalize(name) : name;
addImports({ from: importPath, name, as });
});
});
}
});

View File

@@ -24,11 +24,11 @@
<div flex justify-end gap-3>
<div v-if="done" h-full flex-center text-emerald-400 space-x-1>
<p>Done</p>
<i-heroicons-solid-check size-4 />
<Icon name="heroicons-solid:check" size-4 />
</div>
<div v-if="error" h-full flex-center text-red-400 space-x-1>
<p>Error</p>
<i-heroicons-solid-exclamation-triangle size-4 />
<Icon name="heroicons-solid:exclamation-triangle" size-4 />
</div>
<Btn type="submit" :disabled="fileName === ''">
Create file

View File

@@ -14,7 +14,7 @@
</NuxtLink>
-
<NuxtLink :to="tauriSite" target="_blank" text-accent underline>
Tauri
Tauri 2
</NuxtLink>
-
<NuxtLink :to="unoSite" target="_blank" text-accent underline>

View File

@@ -1,7 +1,6 @@
import {
defineConfig,
presetAttributify,
presetIcons,
presetTagify,
presetTypography,
presetUno,
@@ -21,12 +20,6 @@ export default defineConfig({
presetUno(),
presetTagify(),
presetAttributify(),
presetIcons({
extraProperties: {
display: "inline-block",
"vertical-align": "middle"
}
}),
presetTypography(),
presetWebFonts({
fonts: {